CFPRIME RRDGED                                                          RRDGED      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 RRDGED(ICODE,IUX,IUY,IEBK)                             RRDGED      3
CD                                                                      RRDGED      4
CD    TO READ ADDITIONAL GENERATOR DYNAMIC DATA IN PROGRAM FORMAT       RRDGED      5
CD    FROM A FILE.                                                      RRDGED      6
CD                                                                      RRDGED      7
CD    ROUTINE INPUT:                                                    RRDGED      8
CD                                                                      RRDGED      9
CD    ICODE - NOT USED IN THE PRESENT VERSION                           RRDGED     10
CD    IUX IS THE LOGICAL UNIT OF WHICH GENERATOR DATA ARE READ          RRDGED     11
CD    IUY IS THE UNIT NUMBER FOR ERROR MESSAGES                         RRDGED     12
CD                                                                      RRDGED     13
CD    ROUTINE OUTPUT:                                                   RRDGED     14
CD                                                                      RRDGED     15
CD    IEBK IS THE ERROR FLAG:                                           RRDGED     16
CD    IEBK = 0   NO ERROR                                               RRDGED     17
CD    IEBK = 1   ERROR IN SENSING BUS OF CONTROLS OR MUTLI-MASS DATA    RRDGED     18
CD    IEBK = 2   ERROR IN GENERATOR (NOT FOUND IN THE BASE LOAD FLOW)   RRDGED     19
CD                                                                      RRDGED     20
      INCLUDE 'PARX.INS'                                                RRDGED     21
      INCLUDE 'CNPT.INS'                                                RRDGED     22
      INCLUDE 'CNFLAG.INS'                                              RRDGED     23
      INCLUDE 'CNB19.INS'                                               RRDGED     24
      INCLUDE 'CNPARX.INS'                                              RRDGED     25
      INCLUDE 'CNPBK.INS'                                               RRDGED     26
      INCLUDE 'CNUNIT.INS'                                              RRDGED     27
      INCLUDE 'CNUDM.INS'                                               RRDGED     28
      INCLUDE 'CNMNEW.INS'                                              RRDGED     29
      INCLUDE 'CNJPT.INS'                                               RRDGED     30
      INCLUDE 'CNJDAT.INS'                                              RRDGED     31
      INCLUDE 'CNTMDA.INS'                                              RRDGED     32
      INCLUDE 'CNGSRC.INS'                                              RRDGED     33
      INCLUDE 'CNTGED.INS'                                              RRDGED     34
      INCLUDE 'CNMSG.INS'                                               RRDGED     35
C                                                                       RRDGED     36
      CHARACTER*40 LCARD(2)                                             RRDGED     37
C                                                                       RRDGED     38
      CHARACTER*80 SIMBUF                                               RRDGED     39
      CHARACTER*4 IBLANK,NGRI,LPGID                                     RRDGED     40
C      DIMENSION SATC(12)                                               RRDGED     41
      CHARACTER*12 BUSNAM,BUSR1,BUSR2,LPGNAM                            RRDGED     42
      CHARACTER*5 EDATA                                                 RRDGED     43
      CHARACTER*2 ICKT                                                  RRDGED     44
C                                                                       RRDGED     45
      EQUIVALENCE (LPGID,ILPGID)                                        RRDGED     46
C                                                                       RRDGED     47
      DATA IBLANK/'    '/,EDATA/'EDATA'/                                RRDGED     48
C                                                                       RRDGED     49
      LDEB=(JDEB(6).NE.0)                                               RRDGED     50
C                                                                       RRDGED     51
      LCARD(1)='            FIRST MACHINE CARD          '               RRDGED     52
      LCARD(2)='                                        '               RRDGED     53
CD                                                                      RRDGED     54
CD  READ AND VALIDATE GENERATOR FIRST HEADING DATA                      RRDGED     55
CD                                                                      RRDGED     56
      IEBK=0                                                            RRDGED     57
C                                                                       RRDGED     58
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED     59
      IF(SIMBUF(2:5).NE.'RGEN')GOTO 110                                 RRDGED     60
C                                                                       RRDGED     61
  100 CONTINUE                                                          RRDGED     62
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED     63
 110  IF (LDEB) WRITE(IUD6,5400) SIMBUF                                 RRDGED     64
      IF (SIMBUF(1:5).EQ.EDATA) GOTO 2350                               RRDGED     65
      JPQ=0                                                             RRDGED     66
      JTHGSR=0                                                          RRDGED     67
      IF (KLFO.EQ.0) THEN                                               RRDGED     68
         READ(SIMBUF,8200,IOSTAT=IOS) NLF,NGRI,IPFAX,IQFAX              RRDGED     69
         IF (IOS.NE.0) GOTO 2400                                        RRDGED     70
         LCARD(1)=SIMBUF(1:40)                                          RRDGED     71
         LCARD(2)=SIMBUF(41:80)                                         RRDGED     72
         IF (NLF.GT.N99999) THEN                                        RRDGED     73
            WRITE(MSG(1),4900) N99999                                   RRDGED     74
            MSG(2)=SIMBUF                                               RRDGED     75
            CALL PRTMSG(2)                                              RRDGED     76
            CALL ASTOP('RRDGED: BUS NUMBER TOO LARGE',28)               RRDGED     77
         ELSE IF (NLF.LE.0) THEN                                        RRDGED     78
            WRITE(MSG(1),5000)                                          RRDGED     79
            MSG(2)=SIMBUF                                               RRDGED     80
            CALL PRTMSG(2)                                              RRDGED     81
            CALL ASTOP('RRDGED: INVALID BUS NUMBER',26)                 RRDGED     82
         END IF                                                         RRDGED     83
         NPROG=MNEW(NLF)                                                RRDGED     84
         IF (NPROG.EQ.0) THEN                                           RRDGED     85
            WRITE(MSG(1),4000) NLF,NGRI                                 RRDGED     86
            WRITE(MSG(2),5200)                                          RRDGED     87
            CALL PRTMSG(2)                                              RRDGED     88
            CALL ASTOP('RRDGED: INVALID BUS NUMBER',26)                 RRDGED     89
         END IF                                                         RRDGED     90
      ELSE                                                              RRDGED     91
         READ(SIMBUF,8300,IOSTAT=IOS) BUSNAM,NGRI,IPFAX,IQFAX           RRDGED     92
         IF (IOS.NE.0) GOTO 2400                                        RRDGED     93
         CALL CHKBUS(BUSNAM,NLF)                                        RRDGED     94
         LCARD(1)=SIMBUF(1:40)                                          RRDGED     95
         LCARD(2)=SIMBUF(41:80)                                         RRDGED     96
         IF (NLF.EQ.0) THEN                                             RRDGED     97
            WRITE(MSG(1),5100)                                          RRDGED     98
            MSG(2)=SIMBUF                                               RRDGED     99
            CALL PRTMSG(2)                                              RRDGED    100
            CALL ASTOP('RRDGED: INVALID BUS NAME',24)                   RRDGED    101
         ELSE                                                           RRDGED    102
            NPROG=MNEW(NLF)                                             RRDGED    103
         END IF                                                         RRDGED    104
      END IF                                                            RRDGED    105
CD                                                                      RRDGED    106
CD    READ IN THE SECOND HEADING CARD                                   RRDGED    107
CD                                                                      RRDGED    108
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    109
      READ(SIMBUF,8400,IOSTAT=IOS) IGEN,ISATX,IEXX,ISTABX,IGVN,ITEBN    RRDGED    110
     1                            ,IMXLN,IGSTAN,IFLTN,IUALN,MASSN,ICBRN RRDGED    111
      IF (IOS.NE.0) GOTO 2400                                           RRDGED    112
C                                                                       RRDGED    113
C     IF A GENERATOR IS TO BE READ PREPARE THE GENERATOR STATUS PARAMETERRDGED    114
C                                                                       RRDGED    115
      IF (NGSREC.NE.0.AND.IGEN.LT.12) THEN                              RRDGED    116
         ICKT=NGRI(3:4)                                                 RRDGED    117
         CALL ADFGEN(1,JTHGSR,NGSREC,NLF,ICKT,LFGEN,XGEID,NSORDE)       RRDGED    118
         IF (JTHGSR.LE.0) THEN                                          RRDGED    119
            WRITE(MSG(1),4000) NLF,NGRI                                 RRDGED    120
            WRITE(MSG(2),5200)                                          RRDGED    121
            CALL PRTMSG(2)                                              RRDGED    122
            JTHGSR=0                                                    RRDGED    123
            JDSTAT=6                                                    RRDGED    124
         ELSE                                                           RRDGED    125
            JPQ=1                                                       RRDGED    126
            JTHGSR=NSORDE(JTHGSR)                                       RRDGED    127
            JDSTAT=IGENST(JTHGSR)                                       RRDGED    128
            IF (JDSTAT.EQ.3) THEN                                       RRDGED    129
               WRITE(MSG(1),4000) NLF,NGRI                              RRDGED    130
               WRITE(MSG(2),5300)                                       RRDGED    131
               CALL PRTMSG(2)                                           RRDGED    132
            END IF                                                      RRDGED    133
         END IF                                                         RRDGED    134
      ELSE                                                              RRDGED    135
         JDSTAT=1                                                       RRDGED    136
      END IF                                                            RRDGED    137
CD                                                                      RRDGED    138
CD     LOCATE GENERATOR ADD A NEW GENERATOR IF IT CANNOT BE LOCATED     RRDGED    139
CD                                                                      RRDGED    140
                                                                        RRDGED    141
      IF(NTHGEN(NPROG+1).EQ.0)THEN                                      RRDGED    142
      IF(IGEN.EQ.99)THEN                                                RRDGED    143
      MSG(1)=' *** ERROR THE FOLLOWING GENERATOR HAS NOT BEEN READ'     RRDGED    144
      MSG(2)=LCARD(1)//LCARD(2)                                         RRDGED    145
      MSG(3)=SIMBUF                                                     RRDGED    146
      CALL PRTMSG(3)                                                    RRDGED    147
      CALL ASTOP('RRDGED: NEW GENERATOR DATA ERROR',30)                 RRDGED    148
C                                                                       RRDGED    149
      ELSE                                                              RRDGED    150
C                                                                       RRDGED    151
C     ADD NEW GENERATOR TO NTHGEN LIST                                  RRDGED    152
C                                                                       RRDGED    153
      JNT=JNT+1                                                         RRDGED    154
      NTHGEN(NPROG+1)=JNT                                               RRDGED    155
      GOTO 240                                                          RRDGED    156
      ENDIF                                                             RRDGED    157
      ELSE                                                              RRDGED    158
      K=NTHGEN(NPROG+1)                                                 RRDGED    159
  200 CONTINUE                                                          RRDGED    160
      IF(NGRI.EQ.GENID(K))THEN                                          RRDGED    161
      JJNT=K                                                            RRDGED    162
      GOTO 250                                                          RRDGED    163
      ELSE                                                              RRDGED    164
      N=NEXGEN(K)                                                       RRDGED    165
      IF(N.EQ.0)THEN                                                    RRDGED    166
C                                                                       RRDGED    167
       IF(IGEN.EQ.99)THEN                                               RRDGED    168
C                                                                       RRDGED    169
       MSG(1)=' *** ERROR THE FOLLOWING GENERATOR HAS NOT BEEN READ'    RRDGED    170
       MSG(2)=LCARD(1)//LCARD(2)                                        RRDGED    171
       MSG(3)=SIMBUF                                                    RRDGED    172
       CALL PRTMSG(3)                                                   RRDGED    173
       CALL ASTOP('RRDGED: NEW GENERATOR DATA ERROR',30)                RRDGED    174
C                                                                       RRDGED    175
       ELSE                                                             RRDGED    176
C                                                                       RRDGED    177
C      ADD NEW GENERATOR TO THE NEXGEN LIST                             RRDGED    178
C                                                                       RRDGED    179
       JNT=JNT+1                                                        RRDGED    180
       NEXGEN(K)=JNT                                                    RRDGED    181
       GOTO 240                                                         RRDGED    182
       ENDIF                                                            RRDGED    183
       ELSE                                                             RRDGED    184
       K=N                                                              RRDGED    185
       GOTO 200                                                         RRDGED    186
       ENDIF                                                            RRDGED    187
      ENDIF                                                             RRDGED    188
      ENDIF                                                             RRDGED    189
      GOTO 250                                                          RRDGED    190
  240 CONTINUE                                                          RRDGED    191
C                                                                       RRDGED    192
      NTHGSR(JNT)=JTHGSR                                                RRDGED    193
      IDSTAT(JNT)=JDSTAT                                                RRDGED    194
      NEXGEN(JNT)=0                                                     RRDGED    195
      IF(NPROG.GT.LJNT)LJNT=NPROG                                       RRDGED    196
      IF(JPQ.EQ.0)THEN                                                  RRDGED    197
      IPQFA(1,JNT)=IPFAX                                                RRDGED    198
      IPQFA(2,JNT)=IQFAX                                                RRDGED    199
      ELSE                                                              RRDGED    200
      PQGEN(1,JNT)=GSRCD(1,JTHGSR)                                      RRDGED    201
      PQGEN(2,JNT)=GSRCD(2,JTHGSR)                                      RRDGED    202
      IGENST(JTHGSR)=IGENST(JTHGSR)*I16B                                RRDGED    203
      ENDIF                                                             RRDGED    204
      IGENDA(1,JNT)=0                                                   RRDGED    205
      IGENDA(2,JNT)=0                                                   RRDGED    206
      IGENDA(3,JNT)=0                                                   RRDGED    207
      IGENDA(4,JNT)=0                                                   RRDGED    208
      IGENDA(5,JNT)=0                                                   RRDGED    209
      IGENDA(6,JNT)=0                                                   RRDGED    210
      IGENDA(7,JNT)=0                                                   RRDGED    211
      IGENDA(8,JNT)=0                                                   RRDGED    212
      IGENDA(9,JNT)=0                                                   RRDGED    213
      IGENDA(10,JNT)=0                                                  RRDGED    214
      IGENDA(11,JNT)=0                                                  RRDGED    215
      IGENDA(12,JNT)=0                                                  RRDGED    216
      IGENDA(14,JNT)=0                                                  RRDGED    217
      IGENDA(15,JNT)=0                                                  RRDGED    218
      IGENDA(16,JNT)=0                                                  RRDGED    219
      JGENDA(1,JNT)=0                                                   RRDGED    220
      JGENDA(2,JNT)=0                                                   RRDGED    221
      JGENDA(3,JNT)=0                                                   RRDGED    222
      JGENDA(4,JNT)=0                                                   RRDGED    223
      JGENDA(5,JNT)=0                                                   RRDGED    224
      JGENDA(6,JNT)=0                                                   RRDGED    225
      JGENDA(7,JNT)=0                                                   RRDGED    226
      JGENDA(8,JNT)=0                                                   RRDGED    227
      JGENDA(9,JNT)=0                                                   RRDGED    228
      JGENDA(10,JNT)=0                                                  RRDGED    229
      JGENDA(11,JNT)=0                                                  RRDGED    230
      JJNT=JNT                                                          RRDGED    231
C                                                                       RRDGED    232
  250 IGNOLD=IGENDA(1,JJNT)                                             RRDGED    233
      JEXX=IGENDA(4,JJNT)                                               RRDGED    234
      JSTABX=IGENDA(5,JJNT)                                             RRDGED    235
      JUALN=IGENDA(7,JJNT)                                              RRDGED    236
      JMXLN=IGENDA(12,JJNT)                                             RRDGED    237
      JFLTN=IGENDA(6,JJNT)                                              RRDGED    238
      IF(IEXX.NE.99)JEXX=IEXX                                           RRDGED    239
      IF(ISTABX.NE.99)JSTABX=ISTABX                                     RRDGED    240
      IF(IUALN.NE.99)JUALN=IUALN                                        RRDGED    241
      IF(IMXLN.NE.99)JMXLN=IMXLN                                        RRDGED    242
      IF(IFLTN.NE.99)JFLTN=IFLTN                                        RRDGED    243
      IF(JEXX.EQ.50) THEN                                               RRDGED    244
         IF(JSTABX.EQ.50.OR.JUALN.EQ.50.OR.JMXLN.EQ.50)THEN             RRDGED    245
           IF(KLFO.EQ.0)THEN                                            RRDGED    246
             WRITE(MSG(1),7100) NLF,NGRI                                RRDGED    247
           ELSE                                                         RRDGED    248
             WRITE(MSG(1),7200) BUSNAM,NGRI                             RRDGED    249
           ENDIF                                                        RRDGED    250
           WRITE(MSG(2),6300)                                           RRDGED    251
           WRITE(MSG(3),6400)                                           RRDGED    252
           WRITE(MSG(4),6500)                                           RRDGED    253
           CALL PRTMSG(4)                                               RRDGED    254
           CALL ASTOP('RRDGED: GENERATOR DATA ERROR',28)                RRDGED    255
         ENDIF                                                          RRDGED    256
      ENDIF                                                             RRDGED    257
      IF(JSTABX.EQ.50) THEN                                             RRDGED    258
         IF(JUALN.EQ.50.OR.JFLTN.NE.0.OR.JMXLN.EQ.50)THEN               RRDGED    259
           IF(KLFO.EQ.0)THEN                                            RRDGED    260
             WRITE(MSG(1),7100) NLF,NGRI                                RRDGED    261
           ELSE                                                         RRDGED    262
             WRITE(MSG(1),7200) BUSNAM,NGRI                             RRDGED    263
           ENDIF                                                        RRDGED    264
           WRITE(MSG(2),6600)                                           RRDGED    265
           WRITE(MSG(3),6700)                                           RRDGED    266
           WRITE(MSG(4),6800)                                           RRDGED    267
           CALL PRTMSG(4)                                               RRDGED    268
           CALL ASTOP('RRDGED: GENERATOR DATA ERROR',28)                RRDGED    269
         ENDIF                                                          RRDGED    270
      ENDIF                                                             RRDGED    271
      IF(JUALN.EQ.50) THEN                                              RRDGED    272
         IF(JMXLN.EQ.50) THEN                                           RRDGED    273
           IF(KLFO.EQ.0)THEN                                            RRDGED    274
             WRITE(MSG(1),7100) NLF,NGRI                                RRDGED    275
           ELSE                                                         RRDGED    276
             WRITE(MSG(1),7200) BUSNAM,NGRI                             RRDGED    277
           ENDIF                                                        RRDGED    278
           WRITE(MSG(2),6900)                                           RRDGED    279
           WRITE(MSG(3),7000)                                           RRDGED    280
           CALL PRTMSG(3)                                               RRDGED    281
           CALL ASTOP('RRDGED: GENERATOR DATA ERROR',28)                RRDGED    282
         ENDIF                                                          RRDGED    283
      ENDIF                                                             RRDGED    284
C                                                                       RRDGED    285
      IF(IGEN.EQ.99)THEN                                                RRDGED    286
        IF(IGNOLD.EQ.3.OR.IGNOLD.EQ.7.OR.IGNOLD.EQ.11)GOTO 1650         RRDGED    287
        GOTO 280                                                        RRDGED    288
      ENDIF                                                             RRDGED    289
C                                                                       RRDGED    290
C     CLASSICAL GENERATOR                                               RRDGED    291
C                                                                       RRDGED    292
      IF(IGEN.EQ.3.OR.IGEN.EQ.7.OR.IGEN.EQ.11)THEN                      RRDGED    293
      IGENDA(1,JJNT)=IGEN                                               RRDGED    294
      IGENDA(3,JJNT)=ISATX                                              RRDGED    295
      JGENDA(1,JJNT)=JTLN                                               RRDGED    296
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    297
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LN),LN=1,7)             RRDGED    298
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    299
      JTLN=JTLN+7                                                       RRDGED    300
      CALL MCHECK(NLF,12,JTLN,'RRDGED')                                 RRDGED    301
      GOTO 1650                                                         RRDGED    302
      ENDIF                                                             RRDGED    303
C                                                                       RRDGED    304
C     DETAIL GENERATOR DATA                                             RRDGED    305
C                                                                       RRDGED    306
      IGENDA(1,JJNT)=IGEN                                               RRDGED    307
      JGENDA(1,JJNT)=JTLN                                               RRDGED    308
      JTLN1=JTLN                                                        RRDGED    309
CD                                                                      RRDGED    310
CD  IGEN =99 NO GENERATOR DATA IN CHANGE                                RRDGED    311
CD       = 0 GENERATOR DATA IN IMPEDANCE AND TIME CONSTANT FORM         RRDGED    312
CD       = 1 GENERATOR DATA IN PARK'S FORM WITH NO CROSS MUTUAL         RRDGED    313
CD       = 2 GENERATOR DATA IN PARK'S FORM WITH CROSS MUTUAL            RRDGED    314
CD       = 3 GENERATOR IN CLASSICAL FORM                                RRDGED    315
CD                                                                      RRDGED    316
CD       = 4 H-L PRESSURE REPRESENTATION WITH HP GENERATOR DATA IN IMPEDRRDGED    317
CD               TIME CONSTANT FORM                                     RRDGED    318
CD       = 5 H-L PRESSURE REPRESENTATION WITH HP GENERATOR DATA IN PARK'RRDGED    319
CD               WITH NO CROSS MUTUAL                                   RRDGED    320
CD       = 6 H-L PRESSURE REPRESENTATION WITH HP GENERATOR DATA IN PARK'RRDGED    321
CD               WTIH CROSS MUTUAL                                      RRDGED    322
CD       = 7 H-L PRESSURE REPERSENTATION WITH HP GENERATOR IN CLASSICAL RRDGED    323
CD                                                                      RRDGED    324
CD       = 8 FREQUENCY CONVERTER REPRESENTATION WITH FIRST GENERATOR DATRRDGED    325
CD           IMPEDANCE AND TIME CONSTANT FORM                           RRDGED    326
CD       = 9 FREQUENCY CONVERTER REPRESENTATION WITH FIRST GENERATOR DATRRDGED    327
CD               IN PARK'S FORM WITH NO CROSS MUTUAL                    RRDGED    328
CD       =10 FREQUENCY CONVERTER REPRESENTATION WITH FIRST GENERATOR DATRRDGED    329
CD               IN PARK'S FORM WTIH CROSS MUTUAL                       RRDGED    330
CD       =11 FREQUENCY CONVERTER REPRESENTATION WIHT FIRST GENERATOR DATRRDGED    331
CD               IN CLASSICAL FORM                                      RRDGED    332
CD                                                                      RRDGED    333
CD       =12 SYNCHRONOUS MOTOR DATA IN IMPEDANCE AND TIME CONSTANT FORM RRDGED    334
CD       =13 SYNCHRONOUS MOTOR DATA IN PARK'S FORM WITH NO CROSS MUTUAL RRDGED    335
CD       =14 SYNCHRONOUS MOTOR DATA IN PARK'S FORM WITH CROSS MUTUAL    RRDGED    336
CD                                                                      RRDGED    337
C                                                                       RRDGED    338
      IF(IGEN.EQ.0.OR.IGEN.EQ.4.OR.IGEN.EQ.8.OR.IGEN.EQ.12)THEN         RRDGED    339
CD                                                                      RRDGED    340
CD   CASE THAT GENERATOR DATA IS IN X'S AND TIME CONSTANT FORM          RRDGED    341
CD                                                                      RRDGED    342
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    343
      READ (SIMBUF,8700,IOSTAT=IOS) RAN,XD,XQ,XL,X1D,X1Q,X11D,X11Q      RRDGED    344
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    345
      IF(LDEB)WRITE(IUD6,8700) RAN,XD,XQ,XL,X1D,X1Q,X11D,X11Q           RRDGED    346
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    347
      READ (SIMBUF,8700,IOSTAT=IOS) T1D,T1Q,T11D,T11Q                   RRDGED    348
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    349
      IF(LDEB)WRITE (IUD6,8700) T1D,T1Q,T11D,T11Q                       RRDGED    350
CD                                                                      RRDGED    351
CD     CALL CHKGXT TO PERFORM SANITY CHECK OF GENERATOR DATA            RRDGED    352
CD                                                                      RRDGED    353
       CALL CHKGXT(NLF,BUSNAM,NGRI,                                     RRDGED    354
     &RAN,XD,XQ,XL,X1D,X1Q,X11D,X11Q,T1D,T1Q,T11D,T11Q,IEBK)            RRDGED    355
CD                                                                      RRDGED    356
CD    STORE GENERATOR DATA INTO TDDAT ARRAY                             RRDGED    357
CD                                                                      RRDGED    358
      TDDAT(JTLN+7)=RAN                                                 RRDGED    359
      TDDAT(JTLN+8)=XD                                                  RRDGED    360
      TDDAT(JTLN+9)=XQ                                                  RRDGED    361
      TDDAT(JTLN+10)=XL                                                 RRDGED    362
      TDDAT(JTLN+11)=X1D                                                RRDGED    363
      TDDAT(JTLN+12)=X1Q                                                RRDGED    364
      TDDAT(JTLN+13)=X11D                                               RRDGED    365
      TDDAT(JTLN+14)=X11Q                                               RRDGED    366
      TDDAT(JTLN+15)=T1D                                                RRDGED    367
      TDDAT(JTLN+16)=T1Q                                                RRDGED    368
      TDDAT(JTLN+17)=T11D                                               RRDGED    369
      TDDAT(JTLN+18)=T11Q                                               RRDGED    370
      JTLN=JTLN+18                                                      RRDGED    371
C                                                                       RRDGED    372
C                                                                       RRDGED    373
      ELSE                                                              RRDGED    374
CD                                                                      RRDGED    375
CD    CASE GENERATOR DATA IS IN PARK'S FORM                             RRDGED    376
CD                                                                      RRDGED    377
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    378
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+KK),KK=7,14)            RRDGED    379
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    380
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    381
      READ (SIMBUF,8700,IOSTAT=IOS) TDDAT(JTLN+15),                     RRDGED    382
     *TDDAT(JTLN+16),TDDAT(JTLN+17),TDDAT(JTLN+18),TDDAT(JTLN+19)       RRDGED    383
     *,TDDAT(JTLN+20),TDDAT(JTLN+21),TDDAT(JTLN+22)                     RRDGED    384
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    385
      JTLN=JTLN+22                                                      RRDGED    386
      IF(IGEN.EQ.2.OR.IGEN.EQ.6.OR.IGEN.EQ.10.OR.IGEN.EQ.14)THEN        RRDGED    387
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    388
         READ (SIMBUF,8700,IOSTAT=IOS) TDDAT(JTLN+1),TDDAT(JTLN+2)      RRDGED    389
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    390
         JTLN=JTLN+2                                                    RRDGED    391
      ENDIF                                                             RRDGED    392
C                                                                       RRDGED    393
C   ENDIF IGEN.EQ.0 ETC.                                                RRDGED    394
C                                                                       RRDGED    395
      ENDIF                                                             RRDGED    396
C                                                                       RRDGED    397
C                                                                       RRDGED    398
C                                                                       RRDGED    399
      IGENDA(3,JJNT)=ISATX                                              RRDGED    400
      IF (ISATX.NE.0) THEN                                              RRDGED    401
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    402
C        READ IN (SATC(LN),LN=1,6)                                      RRDGED    403
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LN),LN=1,6)          RRDGED    404
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    405
         JTLN=JTLN+6                                                    RRDGED    406
      ENDIF                                                             RRDGED    407
      IF (ISATX.EQ.3.OR.ISATX.EQ.30) THEN                               RRDGED    408
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    409
C        READ IN (SATC(LN),LN=7,12)                                     RRDGED    410
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LN),LN=1,6)          RRDGED    411
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    412
         JTLN=JTLN+6                                                    RRDGED    413
      ENDIF                                                             RRDGED    414
C                                                                       RRDGED    415
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    416
C                                                                       RRDGED    417
C                                            H        DAMP              RRDGED    418
C                                                                       RRDGED    419
      READ(SIMBUF,8700,IOSTAT=IOS) TDDAT(JTLN1+1),TDDAT(JTLN1+2),       RRDGED    420
C                                                                       RRDGED    421
C         CMTL             BMVA         BVR           WXBASE            RRDGED    422
C                                                                       RRDGED    423
     +TDDAT(JTLN1+3),TDDAT(JTLN1+4),TDDAT(JTLN1+5),TDDAT(JTLN1+6)       RRDGED    424
C                                                                       RRDGED    425
C      SPPSS SPGOV                                                      RRDGED    426
C                                                                       RRDGED    427
     *,DDAT6,DDAT7                                                      RRDGED    428
C                                                                       RRDGED    429
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    430
C                                                                       RRDGED    431
      CALL MCHECK (NLF,1,JTLN,'RRDGED')                                 RRDGED    432
C                                                                       RRDGED    433
 280  IF(MASSN.EQ.99)GOTO 400                                           RRDGED    434
C                                                                       RRDGED    435
      IF(MASSN.EQ.0)THEN                                                RRDGED    436
        IF(IGEN.EQ.99)THEN                                              RRDGED    437
          JMASSN=IGENDA(8,JJNT)                                         RRDGED    438
          IF(JMASSN.NE.0)THEN                                           RRDGED    439
            JTLNH=JGENDA(1,JJNT)                                        RRDGED    440
            HTOTAL=0.0                                                  RRDGED    441
            JTLNM=JGENDA(7,JJNT)                                        RRDGED    442
            IJ=1                                                        RRDGED    443
            DO 290 LI=1,JMASSN                                          RRDGED    444
              IJ=IJ+6                                                   RRDGED    445
              HTOTAL=HTOTAL+TDDAT(JTLNM+IJ+1)                           RRDGED    446
 290        CONTINUE                                                    RRDGED    447
            TDDAT(JTLNH+1)=HTOTAL                                       RRDGED    448
          ENDIF                                                         RRDGED    449
        ENDIF                                                           RRDGED    450
        GOTO 400                                                        RRDGED    451
      ENDIF                                                             RRDGED    452
C                                                                       RRDGED    453
      JTLN=JTLN+1                                                       RRDGED    454
      TDDAT(JTLN+6)=DDAT6                                               RRDGED    455
      TDDAT(JTLN+7)=DDAT7                                               RRDGED    456
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    457
      READ (SIMBUF,8400,IOSTAT=IOS) ITDDAT(JTLN+1),ICPLHN               RRDGED    458
     *,ITDDAT(JTLN+2),ICPLIN,ITDDAT(JTLN+3),ICPLLN                      RRDGED    459
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    460
      ITDDAT(JTLN+4)=ICPLHN                                             RRDGED    461
      ITDDAT(JTLN+5)=ICPLIN                                             RRDGED    462
      IF (ICPLHN.NE.0) ITDDAT(JTLN+4)=1                                 RRDGED    463
      IF (ICPLIN.NE.0) ITDDAT(JTLN+5)=1                                 RRDGED    464
      IF (ICPLLN.NE.0) ICPLLN=1                                         RRDGED    465
      MASSUM=ITDDAT(JTLN+1)+ITDDAT(JTLN+4)+ITDDAT(JTLN+2)               RRDGED    466
     *+ITDDAT(JTLN+5)+ITDDAT(JTLN+3)+ICPLLN                             RRDGED    467
      IF (MASSUM.EQ.MASSN.AND.MASSUM.LE.9) GO TO 300                    RRDGED    468
      IEBK=1                                                            RRDGED    469
      IF (KLFO.EQ.0) THEN                                               RRDGED    470
         WRITE(MSG(1),4000) NLF,NGRI                                    RRDGED    471
      ELSE                                                              RRDGED    472
         WRITE(MSG(1),4100) BUSNAM,NGRI                                 RRDGED    473
      END IF                                                            RRDGED    474
      WRITE(MSG(2),4400) MASSN                                          RRDGED    475
      CALL PRTMSG(2)                                                    RRDGED    476
  300 CONTINUE                                                          RRDGED    477
      KK=1                                                              RRDGED    478
      DO 350 LI=1,MASSN                                                 RRDGED    479
       KK=KK+6                                                          RRDGED    480
       CALL GETLIN(IUX,SIMBUF)                                          RRDGED    481
       READ(SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+KK+LK),LK=1,6)          RRDGED    482
       IF(IOS.NE.0) GOTO 2400                                           RRDGED    483
  350 CONTINUE                                                          RRDGED    484
C                                                                       RRDGED    485
      IGENDA(8,JJNT)=MASSN                                              RRDGED    486
      JGENDA(7,JJNT)=JTLN                                               RRDGED    487
      II=7+6*MASSN                                                      RRDGED    488
C      ITDDAT(JTLN-1)=II                                                RRDGED    489
      ITDDAT(JTLN)=II                                                   RRDGED    490
      JTLN=JTLN+II                                                      RRDGED    491
      CALL MCHECK (NLF,2,JTLN,'RRDGED')                                 RRDGED    492
  400 CONTINUE                                                          RRDGED    493
C                                                                       RRDGED    494
      IF(ICBRN.EQ.99)GOTO 450                                           RRDGED    495
C                                                                       RRDGED    496
      IGENDA(9,JJNT)=ICBRN                                              RRDGED    497
      IF (ICBRN.NE.0) THEN                                              RRDGED    498
      JGENDA(8,JJNT)=0                                                  RRDGED    499
         IF (ICBRN.EQ.2.OR.ICBRN.EQ.3) THEN                             RRDGED    500
            CALL GETLIN(IUX,SIMBUF)                                     RRDGED    501
            READ(SIMBUF,8900,IOSTAT=IOS) TDDAT(JTLN+1),TDDAT(JTLN+2)    RRDGED    502
     *                                  ,ITDDAT(JTLN+3),TDDAT(JTLN+4)   RRDGED    503
            IF (IOS.NE.0) GOTO 2400                                     RRDGED    504
            JGENDA(8,JJNT)=JTLN                                         RRDGED    505
            JTLN=JTLN+4                                                 RRDGED    506
         ELSE IF (ICBRN.NE.1) THEN                                      RRDGED    507
            IF (KLFO.EQ.0) THEN                                         RRDGED    508
               WRITE(MSG(1),4000) NLF,NGRI                              RRDGED    509
            ELSE                                                        RRDGED    510
               WRITE(MSG(1),4100) BUSNAM,NGRI                           RRDGED    511
            END IF                                                      RRDGED    512
            WRITE(MSG(2),5900) ICBRN                                    RRDGED    513
            CALL PRTMSG(2)                                              RRDGED    514
         END IF                                                         RRDGED    515
      END IF                                                            RRDGED    516
C                                                                       RRDGED    517
  450 CONTINUE                                                          RRDGED    518
C                                                                       RRDGED    519
C     EXCITATION                                                        RRDGED    520
C                                                                       RRDGED    521
      IF(IEXX.EQ.99)GOTO 600                                            RRDGED    522
C                                                                       RRDGED    523
      IGENDA(4,JJNT)=IEXX                                               RRDGED    524
      JGENDA(3,JJNT)=0                                                  RRDGED    525
      IF (IEXX.EQ.0) THEN                                               RRDGED    526
         IGENDA(5,JJNT)=0                                               RRDGED    527
         IGENDA(6,JJNT)=0                                               RRDGED    528
         IGENDA(7,JJNT)=0                                               RRDGED    529
         IGENDA(11,JJNT)=0                                              RRDGED    530
         IGENDA(12,JJNT)=0                                              RRDGED    531
         GO TO 1650                                                     RRDGED    532
      END IF                                                            RRDGED    533
      IF (IEXX.EQ.50) GO TO 500                                         RRDGED    534
      JTLN=JTLN+1                                                       RRDGED    535
      JGENDA(3,JJNT)=JTLN                                               RRDGED    536
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    537
      IF (KLFO.EQ.0) THEN                                               RRDGED    538
         READ (SIMBUF,8400,IOSTAT=IOS) IVTN,LVUEL,LVOEL,LVS             RRDGED    539
         IF (IOS.NE.0) GOTO 2400                                        RRDGED    540
         IF (IVTN.LE.0) IVTN=NLF                                        RRDGED    541
         IWS1=MNEW(IVTN)                                                RRDGED    542
         IF (IWS1.EQ.0) THEN                                            RRDGED    543
            WRITE(MSG(1),4000) NLF,NGRI                                 RRDGED    544
            WRITE(MSG(2),6200) IVTN                                     RRDGED    545
            WRITE(MSG(3),6100)                                          RRDGED    546
            CALL PRTMSG(3)                                              RRDGED    547
            IVTN=NLF                                                    RRDGED    548
         END IF                                                         RRDGED    549
      ELSE                                                              RRDGED    550
         READ(SIMBUF,8600,IOSTAT=IOS) BUSR1,LVUEL,LVOEL,LVS             RRDGED    551
         IF (IOS.NE.0) GOTO 2400                                        RRDGED    552
         IF (BUSR1.EQ.'            ') THEN                              RRDGED    553
            IVTN=NLF                                                    RRDGED    554
         ELSE                                                           RRDGED    555
            CALL CHKBUS(BUSR1,IVTN)                                     RRDGED    556
            IF (IVTN.EQ.0) THEN                                         RRDGED    557
               WRITE(MSG(1),4100) BUSNAM,NGRI                           RRDGED    558
               WRITE(MSG(2),6000) BUSR1                                 RRDGED    559
               WRITE(MSG(3),6100)                                       RRDGED    560
               CALL PRTMSG(3)                                           RRDGED    561
               IVTN=NLF                                                 RRDGED    562
            END IF                                                      RRDGED    563
         END IF                                                         RRDGED    564
      END IF                                                            RRDGED    565
      ITDDAT(JTLN+1)=IVTN                                               RRDGED    566
      IF (LVUEL.EQ.0) LVUEL=1                                           RRDGED    567
      IF (LVOEL.EQ.0) LVOEL=1                                           RRDGED    568
      IF (LVS.EQ.0) LVS=1                                               RRDGED    569
      IGENDA(14,JJNT)=LVUEL                                             RRDGED    570
      IGENDA(15,JJNT)=LVOEL                                             RRDGED    571
      IGENDA(16,JJNT)=LVS                                               RRDGED    572
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    573
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=2,9)             RRDGED    574
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    575
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    576
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=10,17)           RRDGED    577
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    578
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    579
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=18,25)           RRDGED    580
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    581
      IF(IEXX.EQ.4.OR.IEXX.EQ.5.OR.IEXX.EQ.6.OR.IEXX.EQ.8.OR.IEXX.EQ.14 RRDGED    582
     + .OR.IEXX.EQ.30.OR.IEXX.EQ.32.OR.IEXX.EQ.3)                       RRDGED    583
     + CALL GETLIN(IUX,SIMBUF)                                          RRDGED    584
      IF (IEXX.EQ.4.OR.IEXX.EQ.6.OR.IEXX.EQ.8) THEN                     RRDGED    585
      READ (SIMBUF,8700,IOSTAT=IOS) TDDAT(JTLN+26),TDDAT(JTLN+27)       RRDGED    586
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    587
      JTLN=JTLN+27                                                      RRDGED    588
      ELSE IF(IEXX.EQ.5.OR.IEXX.EQ.3.OR.IEXX.EQ.14) THEN                RRDGED    589
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=26,33)           RRDGED    590
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    591
      JTLN=JTLN+33                                                      RRDGED    592
      ELSE IF(IEXX.EQ.30) THEN                                          RRDGED    593
      READ (SIMBUF,8700,IOSTAT=IOS) TDDAT(JTLN+26),TDDAT(JTLN+27),      RRDGED    594
     * TDDAT(JTLN+28),TDDAT(JTLN+29)                                    RRDGED    595
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    596
      JTLN=JTLN+29                                                      RRDGED    597
      ELSE IF(IEXX.EQ.32) THEN                                          RRDGED    598
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=26,33)           RRDGED    599
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    600
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    601
      READ (SIMBUF,8700,IOSTAT=IOS) TDDAT(JTLN+34),TDDAT(JTLN+35)       RRDGED    602
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    603
      JTLN=JTLN+35                                                      RRDGED    604
      ELSE                                                              RRDGED    605
      JTLN=JTLN+25                                                      RRDGED    606
      ENDIF                                                             RRDGED    607
      GO TO 550                                                         RRDGED    608
  500 CONTINUE                                                          RRDGED    609
C                                                                       RRDGED    610
C *****ADD CODE TO CHECK OTHER UDEFINED EXCTIATION CONTROLS             RRDGED    611
C     WITH USER DEFINED EXCITER NO USER DEFINED STABILIZER,UAL, AND     RRDGED    612
C                                               MXL IS ALLOWED          RRDGED    613
C                                                                       RRDGED    614
C     USER DEFINED EXCITER DATA                                         RRDGED    615
C                                                                       RRDGED    616
      JGENDA(3,JJNT)=JTLN                                               RRDGED    617
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    618
      READ (SIMBUF,8800,IOSTAT=IOS) TDDAT(JTLN+1),TDDAT(JTLN+2),        RRDGED    619
     *ITDDAT(JTLN+3)                                                    RRDGED    620
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    621
      IF(ITDDAT(JTLN+3).LT.1)ITDDAT(JTLN+3)=1                           RRDGED    622
      JTLN=JTLN+8                                                       RRDGED    623
C                                                                       RRDGED    624
      JTLN1=0                                                           RRDGED    625
      NUF=1                                                             RRDGED    626
      CALL RUDMDA(NUF,IUX,IU16,JTLN1,SIMBUF)                            RRDGED    627
      IF(NUF.EQ.900) GO TO 2400                                         RRDGED    628
  550 CONTINUE                                                          RRDGED    629
      CALL MCHECK (NLF,3,JTLN,'RRDGED')                                 RRDGED    630
C                                                                       RRDGED    631
  600 CONTINUE                                                          RRDGED    632
C                                                                       RRDGED    633
C--  READ STABILIZER DATA IF THERE IS ANY                               RRDGED    634
C                                                                       RRDGED    635
      IF(ISTABX.EQ.99)GOTO 1350                                         RRDGED    636
      IGENDA(5,JJNT)=ISTABX                                             RRDGED    637
      JGENDA(4,JJNT)=0                                                  RRDGED    638
      IF (ISTABX.EQ.0) THEN                                             RRDGED    639
         IGENDA(6,JJNT)=0                                               RRDGED    640
         GO TO 1400                                                     RRDGED    641
      END IF                                                            RRDGED    642
      IF(ISTABX.EQ.50) GO TO 1250                                       RRDGED    643
      JGENDA(4,JJNT)=JTLN                                               RRDGED    644
C                                                                       RRDGED    645
C     READ IN THE STABILIZER DATA                                       RRDGED    646
C                                                                       RRDGED    647
C            1   2   3   4   5   6   7    8   9  10   11   12           RRDGED    648
      GOTO(650,750,750,650,750,750,850,1300,900,950,1050,1150),ISTABX   RRDGED    649
C                                                                       RRDGED    650
  650 CONTINUE                                                          RRDGED    651
C                                                                       RRDGED    652
C   TYPE 1 AND 4 STABILIZER                                             RRDGED    653
C                                                                       RRDGED    654
      ASSIGN 700 TO I470                                                RRDGED    655
      GOTO 1200                                                         RRDGED    656
  700 CONTINUE                                                          RRDGED    657
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    658
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=3,10)         RRDGED    659
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    660
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    661
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=11,14)        RRDGED    662
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    663
         JTLN=JTLN+14                                                   RRDGED    664
      GOTO 1300                                                         RRDGED    665
  750 CONTINUE                                                          RRDGED    666
C                                                                       RRDGED    667
C   TYPE 2,3,5 AND 6 STABILIZER                                         RRDGED    668
C                                                                       RRDGED    669
      ASSIGN 800 TO I470                                                RRDGED    670
      GOTO 1200                                                         RRDGED    671
  800 CONTINUE                                                          RRDGED    672
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    673
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=3,10)         RRDGED    674
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    675
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    676
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=11,14)        RRDGED    677
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    678
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    679
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=15,22)        RRDGED    680
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    681
         JTLN=JTLN+22                                                   RRDGED    682
      GOTO 1300                                                         RRDGED    683
C                                                                       RRDGED    684
  850 CONTINUE                                                          RRDGED    685
C                                                                       RRDGED    686
C   TYPE 7 STABILIZER                                                   RRDGED    687
C                                                                       RRDGED    688
      ITDDAT(JTLN+1)=0                                                  RRDGED    689
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    690
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=2,8)             RRDGED    691
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    692
      JTLN=JTLN+8                                                       RRDGED    693
      GOTO 1300                                                         RRDGED    694
C                                                                       RRDGED    695
  900 CONTINUE                                                          RRDGED    696
C                                                                       RRDGED    697
C     TYPES 9 STABILIZER                                                RRDGED    698
C                                                                       RRDGED    699
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    700
         IF (KLFO.EQ.0) THEN                                            RRDGED    701
            READ(SIMBUF,8400,IOSTAT=IOS) IWS1,ITDDAT(JTLN+2)            RRDGED    702
     1                                  ,ITDDAT(JTLN+5),ITDDAT(JTLN+6)  RRDGED    703
            IF (IOS.NE.0) GOTO 2400                                     RRDGED    704
            IF (IWS1.EQ.0) IWS1=NLF                                     RRDGED    705
            IWS2=MNEW(IWS1)                                             RRDGED    706
            IF (IWS2.EQ.0) THEN                                         RRDGED    707
               WRITE(MSG(1),4000) NLF,NGRI                              RRDGED    708
               WRITE(MSG(2),8100) IWS1                                  RRDGED    709
               WRITE(MSG(3),6100)                                       RRDGED    710
               CALL PRTMSG(3)                                           RRDGED    711
               ITDDAT(JTLN+1)=NLF                                       RRDGED    712
            ELSE                                                        RRDGED    713
               ITDDAT(JTLN+1)=IWS1                                      RRDGED    714
            END IF                                                      RRDGED    715
         ELSE                                                           RRDGED    716
            READ (SIMBUF,8600,IOSTAT=IOS) BUSR1,ITDDAT(JTLN+2)          RRDGED    717
     1                                   ,ITDDAT(JTLN+5),ITDDAT(JTLN+6) RRDGED    718
            IF (IOS.NE.0) GOTO 2400                                     RRDGED    719
            IF (BUSR1.EQ.'            ') THEN                           RRDGED    720
               ITDDAT(JTLN+1)=NLF                                       RRDGED    721
            ELSE                                                        RRDGED    722
               CALL CHKBUS(BUSR1,NOBS1)                                 RRDGED    723
               IF (NOBS1.EQ.0) THEN                                     RRDGED    724
                  ITDDAT(JTLN+1)=NLF                                    RRDGED    725
                  WRITE(MSG(1),4100) BUSNAM,NGRI                        RRDGED    726
                  WRITE(MSG(2),5500) BUSR1                              RRDGED    727
                  WRITE(MSG(3),5600)                                    RRDGED    728
                  CALL PRTMSG(3)                                        RRDGED    729
               ELSE                                                     RRDGED    730
                  ITDDAT(JTLN+1)=NOBS1                                  RRDGED    731
               END IF                                                   RRDGED    732
            END IF                                                      RRDGED    733
         END IF                                                         RRDGED    734
         ITDDAT(JTLN+3)=0                                               RRDGED    735
         ITDDAT(JTLN+4)=4                                               RRDGED    736
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    737
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=7,14)         RRDGED    738
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    739
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    740
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=15,22)        RRDGED    741
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    742
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    743
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=23,29)        RRDGED    744
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    745
         JTLN=JTLN+29                                                   RRDGED    746
      GOTO 1300                                                         RRDGED    747
  950 CONTINUE                                                          RRDGED    748
C                                                                       RRDGED    749
C   TYPE 10 STABILIZER                                                  RRDGED    750
C                                                                       RRDGED    751
      ASSIGN 1000 TO I470                                               RRDGED    752
      GOTO 1200                                                         RRDGED    753
 1000 CONTINUE                                                          RRDGED    754
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    755
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=3,9)          RRDGED    756
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    757
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    758
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=10,16)        RRDGED    759
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    760
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    761
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=17,20)        RRDGED    762
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    763
         JTLN=JTLN+20                                                   RRDGED    764
      GOTO 1300                                                         RRDGED    765
 1050 CONTINUE                                                          RRDGED    766
C                                                                       RRDGED    767
C   TYPE 11 STABILIZER                                                  RRDGED    768
C                                                                       RRDGED    769
      ASSIGN 1100 TO I470                                               RRDGED    770
      GOTO 1200                                                         RRDGED    771
 1100 CONTINUE                                                          RRDGED    772
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    773
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=3,9)          RRDGED    774
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    775
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    776
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=10,17)        RRDGED    777
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    778
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    779
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=18,25)        RRDGED    780
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    781
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    782
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=26,30)        RRDGED    783
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    784
         JTLN=JTLN+30                                                   RRDGED    785
           GOTO 1300                                                    RRDGED    786
 1150 CONTINUE                                                          RRDGED    787
C                                                                       RRDGED    788
C   TYPE 12 STABILIZER                                                  RRDGED    789
C                                                                       RRDGED    790
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    791
         IF(KLFO.EQ.0)THEN                                              RRDGED    792
            READ(SIMBUF,8400,IOSTAT=IOS) IWS1,ITDDAT(JTLN+2)            RRDGED    793
     1                                  ,IWS2,ITDDAT(JTLN+4)            RRDGED    794
            IF (IOS.NE.0) GOTO 2400                                     RRDGED    795
            IF (IWS1.EQ.0) IWS1=NLF                                     RRDGED    796
            IF (IWS2.EQ.0) IWS2=NLF                                     RRDGED    797
            IWS3=MNEW(IWS1)                                             RRDGED    798
            IF (IWS3.EQ.0) THEN                                         RRDGED    799
               WRITE(MSG(1),4000) NLF,NGRI                              RRDGED    800
               WRITE(MSG(2),8100) IWS1                                  RRDGED    801
               WRITE(MSG(3),6100)                                       RRDGED    802
               CALL PRTMSG(3)                                           RRDGED    803
               ITDDAT(JTLN+1)=NLF                                       RRDGED    804
            ELSE                                                        RRDGED    805
               ITDDAT(JTLN+1)=IWS1                                      RRDGED    806
            END IF                                                      RRDGED    807
            IWS3=MNEW(IWS2)                                             RRDGED    808
            IF (IWS3.EQ.0) THEN                                         RRDGED    809
               WRITE(MSG(1),4000) NLF,NGRI                              RRDGED    810
               WRITE(MSG(2),8100) IWS2                                  RRDGED    811
               WRITE(MSG(3),6100)                                       RRDGED    812
               CALL PRTMSG(3)                                           RRDGED    813
               ITDDAT(JTLN+3)=NLF                                       RRDGED    814
            ELSE                                                        RRDGED    815
               ITDDAT(JTLN+3)=IWS2                                      RRDGED    816
            END IF                                                      RRDGED    817
         ELSE                                                           RRDGED    818
            READ(SIMBUF,8500,IOSTAT=IOS) BUSR1,ITDDAT(JTLN+2)           RRDGED    819
     1                                  ,BUSR2,ITDDAT(JTLN+4)           RRDGED    820
            IF (IOS.NE.0) GOTO 2400                                     RRDGED    821
            IF (BUSR1.EQ.'            ') THEN                           RRDGED    822
               ITDDAT(JTLN+1)=NLF                                       RRDGED    823
            ELSE                                                        RRDGED    824
               CALL CHKBUS(BUSR1,NOBS1)                                 RRDGED    825
               IF (NOBS1.EQ.0) THEN                                     RRDGED    826
                  ITDDAT(JTLN+1)=NLF                                    RRDGED    827
                  WRITE(MSG(1),4100) BUSNAM,NGRI                        RRDGED    828
                  WRITE(MSG(2),5500) BUSR1                              RRDGED    829
                  WRITE(MSG(3),5600)                                    RRDGED    830
                  CALL PRTMSG(3)                                        RRDGED    831
               ELSE                                                     RRDGED    832
                  ITDDAT(JTLN+1)=NOBS1                                  RRDGED    833
               END IF                                                   RRDGED    834
            END IF                                                      RRDGED    835
            IF (BUSR2.EQ.'            ') THEN                           RRDGED    836
               ITDDAT(JTLN+3)=NLF                                       RRDGED    837
            ELSE                                                        RRDGED    838
               CALL CHKBUS(BUSR2,NOBS2)                                 RRDGED    839
               IF (NOBS2.EQ.0) THEN                                     RRDGED    840
                  ITDDAT(JTLN+3)=NLF                                    RRDGED    841
                  WRITE(MSG(1),4100) BUSNAM,NGRI                        RRDGED    842
                  WRITE(MSG(2),5500) BUSR2                              RRDGED    843
                  WRITE(MSG(3),5600)                                    RRDGED    844
                  CALL PRTMSG(3)                                        RRDGED    845
               ELSE                                                     RRDGED    846
                  ITDDAT(JTLN+3)=NOBS2                                  RRDGED    847
               END IF                                                   RRDGED    848
            END IF                                                      RRDGED    849
         END IF                                                         RRDGED    850
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    851
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=5,12)         RRDGED    852
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    853
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    854
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=13,18)        RRDGED    855
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    856
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    857
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=19,24)        RRDGED    858
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    859
         JTLN=JTLN+24                                                   RRDGED    860
      GOTO 1300                                                         RRDGED    861
C                                                                       RRDGED    862
C   COMMON PART OF DATA FOR STABILIZER                                  RRDGED    863
C   TYPES 1,2,3,4,5,6,10 AND 11                                         RRDGED    864
C                                                                       RRDGED    865
 1200 CONTINUE                                                          RRDGED    866
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    867
         IF (KLFO.EQ.0) THEN                                            RRDGED    868
            READ(SIMBUF,8400,IOSTAT=IOS) IWS1,ITDDAT(JTLN+2)            RRDGED    869
            IF (IOS.NE.0) GOTO 2400                                     RRDGED    870
            IF (IWS1.EQ.0) IWS1=NLF                                     RRDGED    871
            IWS2=MNEW(IWS1)                                             RRDGED    872
            IF (IWS2.EQ.0) THEN                                         RRDGED    873
               WRITE(MSG(1),4000) NLF,NGRI                              RRDGED    874
               WRITE(MSG(2),8100) IWS1                                  RRDGED    875
               WRITE(MSG(3),6100)                                       RRDGED    876
               CALL PRTMSG(3)                                           RRDGED    877
               ITDDAT(JTLN+1)=NLF                                       RRDGED    878
            ELSE                                                        RRDGED    879
               ITDDAT(JTLN+1)=IWS1                                      RRDGED    880
            END IF                                                      RRDGED    881
         ELSE                                                           RRDGED    882
            READ(SIMBUF,8500,IOSTAT=IOS) BUSR1,ITDDAT(JTLN+2)           RRDGED    883
            IF (IOS.NE.0) GOTO 2400                                     RRDGED    884
            IF (BUSR1.EQ.'            ') THEN                           RRDGED    885
               ITDDAT(JTLN+1)=NLF                                       RRDGED    886
            ELSE                                                        RRDGED    887
               CALL CHKBUS(BUSR1,NOBS1)                                 RRDGED    888
               IF (NOBS1.EQ.0) THEN                                     RRDGED    889
                  ITDDAT(JTLN+1)=NLF                                    RRDGED    890
                  WRITE(MSG(1),4100) BUSNAM,NGRI                        RRDGED    891
                  WRITE(MSG(2),5500) BUSR1                              RRDGED    892
                  WRITE(MSG(3),5600)                                    RRDGED    893
                  CALL PRTMSG(3)                                        RRDGED    894
               ELSE                                                     RRDGED    895
                  ITDDAT(JTLN+1)=NOBS1                                  RRDGED    896
               END IF                                                   RRDGED    897
            END IF                                                      RRDGED    898
         END IF                                                         RRDGED    899
         GOTO I470                                                      RRDGED    900
C                                                                       RRDGED    901
 1250 CONTINUE                                                          RRDGED    902
C                                                                       RRDGED    903
C                                                                       RRDGED    904
C***** ADD CODE TO CHECK OTHER EXCITATION MODELS                        RRDGED    905
C                                                                       RRDGED    906
C     USER DEFINED STABILIZER DATA                                      RRDGED    907
C                                                                       RRDGED    908
      JGENDA(4,JJNT)=JTLN                                               RRDGED    909
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    910
      READ (SIMBUF,8800,IOSTAT=IOS) TDDAT(JTLN+1),TDDAT(JTLN+2),        RRDGED    911
     *ITDDAT(JTLN+3)                                                    RRDGED    912
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    913
      IF(ITDDAT(JTLN+3).LT.1)ITDDAT(JTLN+3)=1                           RRDGED    914
      JTLN=JTLN+8                                                       RRDGED    915
C                                                                       RRDGED    916
      JTLN1=0                                                           RRDGED    917
      NUF=2                                                             RRDGED    918
      CALL RUDMDA(NUF,IUX,IU16,JTLN1,SIMBUF)                            RRDGED    919
      IF(NUF.EQ.900) GO TO 2400                                         RRDGED    920
 1300 CONTINUE                                                          RRDGED    921
      CALL MCHECK (NLF,4,JTLN,'RRDGED')                                 RRDGED    922
C                                                                       RRDGED    923
 1350 CONTINUE                                                          RRDGED    924
C                                                                       RRDGED    925
C--  READ TORSIONAL FILTER DATA IF THERE IS ANY                         RRDGED    926
C                                                                       RRDGED    927
      IF (IFLTN.EQ.99)GOTO 1400                                         RRDGED    928
      IGENDA(6,JJNT)=IFLTN                                              RRDGED    929
      JGENDA(5,JJNT)=0                                                  RRDGED    930
      IF(IFLTN.EQ.0) GO TO 1400                                         RRDGED    931
      JGENDA(5,JJNT)=JTLN                                               RRDGED    932
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    933
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=1,8)             RRDGED    934
      IF(IOS.NE.0) GOTO 2400                                            RRDGED    935
      JTLN=JTLN+8                                                       RRDGED    936
      CALL MCHECK (NLF,5,JTLN,'RRDGED')                                 RRDGED    937
C                                                                       RRDGED    938
C--  READ TRANSIENT EXCITATION BOOSTER DATA IF THERE IS ANY             RRDGED    939
C                                                                       RRDGED    940
 1400 CONTINUE                                                          RRDGED    941
C                                                                       RRDGED    942
      IF(ITEBN.EQ.99)GOTO 1450                                          RRDGED    943
      IGENDA(11,JJNT)=ITEBN                                             RRDGED    944
      JGENDA(10,JJNT)=0                                                 RRDGED    945
      IF (ITEBN.NE.0) THEN                                              RRDGED    946
         JGENDA(10,JJNT)=JTLN                                           RRDGED    947
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED    948
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=2,5)          RRDGED    949
         IF(IOS.NE.0) GOTO 2400                                         RRDGED    950
         JTLN=JTLN+5                                                    RRDGED    951
      ENDIF                                                             RRDGED    952
C                                                                       RRDGED    953
 1450 CONTINUE                                                          RRDGED    954
C                                                                       RRDGED    955
C--  READ MAXIMUM EXCITATION LIMITER DATA IF THERE IS ANY               RRDGED    956
C                                                                       RRDGED    957
      IF(IMXLN.EQ.99)GOTO 1500                                          RRDGED    958
      IGENDA(12,JJNT)=IMXLN                                             RRDGED    959
      JGENDA(11,JJNT)=0                                                 RRDGED    960
      IF (IMXLN.NE.0) THEN                                              RRDGED    961
         JGENDA(11,JJNT)=JTLN                                           RRDGED    962
         IF(IMXLN.EQ.50) THEN                                           RRDGED    963
C                                                                       RRDGED    964
C     USER DEFINED OVER EXCITATION LIMITER DATA                         RRDGED    965
C                                                                       RRDGED    966
            CALL GETLIN(IUX,SIMBUF)                                     RRDGED    967
            READ (SIMBUF,8800,IOSTAT=IOS) TDDAT(JTLN+1),TDDAT(JTLN+2),  RRDGED    968
     *      ITDDAT(JTLN+3)                                              RRDGED    969
            IF(IOS.NE.0) GOTO 2400                                      RRDGED    970
            IF(ITDDAT(JTLN+3).LT.1)ITDDAT(JTLN+3)=1                     RRDGED    971
            JTLN=JTLN+8                                                 RRDGED    972
C                                                                       RRDGED    973
            JTLN1=1                                                     RRDGED    974
            NUF=3                                                       RRDGED    975
            CALL RUDMDA(NUF,IUX,IU16,JTLN1,SIMBUF)                      RRDGED    976
            IF(NUF.EQ.900) GO TO 2400                                   RRDGED    977
         ELSE                                                           RRDGED    978
            CALL GETLIN(IUX,SIMBUF)                                     RRDGED    979
            READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=1,8)       RRDGED    980
            IF(IOS.NE.0) GOTO 2400                                      RRDGED    981
            JTLN=JTLN+8                                                 RRDGED    982
         ENDIF                                                          RRDGED    983
      ENDIF                                                             RRDGED    984
C                                                                       RRDGED    985
 1500 CONTINUE                                                          RRDGED    986
C                                                                       RRDGED    987
C--  READ UNDER EXCITATION LIMITER DATA IF THERE IS ANY                 RRDGED    988
C                                                                       RRDGED    989
      IF(IUALN.EQ.99)GOTO 1650                                          RRDGED    990
C                                                                       RRDGED    991
      IGENDA(7,JJNT)=IUALN                                              RRDGED    992
      JGENDA(6,JJNT)=0                                                  RRDGED    993
      IF (IUALN.EQ.0) GO TO 1650                                        RRDGED    994
      IF (IUALN.EQ.50.AND.ISTABX.NE.50) GO TO 1550                      RRDGED    995
      IF (IUALN.EQ.50) GO TO 1650                                       RRDGED    996
      JGENDA(6,JJNT)=JTLN                                               RRDGED    997
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED    998
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=1,8)             RRDGED    999
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1000
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1001
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LJ),LJ=9,16)            RRDGED   1002
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1003
      JTLN=JTLN+16                                                      RRDGED   1004
      GO TO 1600                                                        RRDGED   1005
 1550 CONTINUE                                                          RRDGED   1006
C                                                                       RRDGED   1007
C*****ADD CODE TO CHECK OTHER USER DEFINED EXCITATION MODELS            RRDGED   1008
C                                                                       RRDGED   1009
C     WITH USER DEFINED UNDER EXCITATION LIMITER NO USER DEFINED        RRDGED   1010
C                                                  MXL IS ALLOWED       RRDGED   1011
C                                                                       RRDGED   1012
C     USER DEFINED UNDER EXCITATION LIMITER DATA                        RRDGED   1013
C                                                                       RRDGED   1014
      JGENDA(6,JJNT)=JTLN                                               RRDGED   1015
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1016
      READ (SIMBUF,8800,IOSTAT=IOS) TDDAT(JTLN+1),TDDAT(JTLN+2),        RRDGED   1017
     *ITDDAT(JTLN+3)                                                    RRDGED   1018
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1019
      IF(ITDDAT(JTLN+3).LT.1)ITDDAT(JTLN+3)=1                           RRDGED   1020
      JTLN=JTLN+8                                                       RRDGED   1021
C                                                                       RRDGED   1022
      JTLN1=0                                                           RRDGED   1023
      NUF=3                                                             RRDGED   1024
      CALL RUDMDA(NUF,IUX,IU16,JTLN1,SIMBUF)                            RRDGED   1025
      IF(NUF.EQ.900) GO TO 2400                                         RRDGED   1026
 1600 CONTINUE                                                          RRDGED   1027
      CALL MCHECK (NLF,6,JTLN,'RRDGED')                                 RRDGED   1028
 1650 CONTINUE                                                          RRDGED   1029
C                                                                       RRDGED   1030
      IF(IGVN.EQ.99)GOTO 100                                            RRDGED   1031
C                                                                       RRDGED   1032
      JGVN=IGENDA(2,JJNT)                                               RRDGED   1033
      IGENDA(2,JJNT)=IGVN                                               RRDGED   1034
      JGENDA(2,JJNT)=0                                                  RRDGED   1035
      IF (IGVN.EQ.0) GO TO 100                                          RRDGED   1036
      JTLN=JTLN+1                                                       RRDGED   1037
      JGENDA(2,JJNT)=JTLN                                               RRDGED   1038
      IF (IGVN.EQ.50) GO TO 2250                                        RRDGED   1039
      IGVNB=0                                                           RRDGED   1040
*IF LTSP                                                                RRDGED   1041
*ENDIF                                                                  RRDGED   1049
C   TYPE :    1    2    3    4    5    6    7    8    9   10            RRDGED   1050
      GOTO(1700,1700,2100,1750,1800,1850,1900,1950,2100,2100            RRDGED   1051
C            11   12   13   14   15                                     RRDGED   1052
     &    ,2100,2100,2100,2100,2100                                     RRDGED   1053
C            16   17   18   19   20   21   22                           RRDGED   1054
     &    ,2100,2100,2100,2100,2000,2050,2050), IGVN                    RRDGED   1055
C                                                                       RRDGED   1056
C  TYPE 1, 2                                                            RRDGED   1057
C                                                                       RRDGED   1058
 1700 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1059
      READ (SIMBUF,8400,IOSTAT=IOS) ILNN,IFVN                           RRDGED   1060
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1061
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1062
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=17,23)           RRDGED   1063
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1064
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1065
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=24,28)           RRDGED   1066
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1067
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1068
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=47,54)           RRDGED   1069
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1070
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1071
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=55,62)           RRDGED   1072
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1073
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1074
      READ (SIMBUF,8700,IOSTAT=IOS) DTYP1,TDDAT(JTLN+63)                RRDGED   1075
     *,DTYP2,TDDAT(JTLN+64)                                             RRDGED   1076
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1077
      IF (DTYP1.GT.1.0) TDDAT(JTLN+63)=-TDDAT(JTLN+63)                  RRDGED   1078
      IF (DTYP2.GT.1.0) TDDAT(JTLN+64)=-TDDAT(JTLN+64)                  RRDGED   1079
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1080
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=29,36)           RRDGED   1081
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1082
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1083
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=37,44)           RRDGED   1084
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1085
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1086
      READ (SIMBUF,8700,IOSTAT=IOS) DTYP1,TDDAT(JTLN+45)                RRDGED   1087
     *,DTYP2,TDDAT(JTLN+46)                                             RRDGED   1088
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1089
      IF (DTYP1.GT.1.0) TDDAT(JTLN+45)=-TDDAT(JTLN+45)                  RRDGED   1090
      IF (DTYP2.GT.1.0) TDDAT(JTLN+46)=-TDDAT(JTLN+46)                  RRDGED   1091
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1092
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,8)             RRDGED   1093
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1094
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1095
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=9,16)            RRDGED   1096
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1097
      ITDDAT(JTLN+65)=ILNN                                              RRDGED   1098
      ITDDAT(JTLN+66)=IFVN                                              RRDGED   1099
      IF(IGVNB.EQ.0)THEN                                                RRDGED   1100
         ITDDAT(JTLN)=66                                                RRDGED   1101
         JTLN=JTLN+66                                                   RRDGED   1102
      ELSE                                                              RRDGED   1103
C                                                                       RRDGED   1104
C     READ IN THE SIMPIFIED BOILER AND ITS CONTROLS                     RRDGED   1105
C     NOTE THAT THE FOLLOWING CODE MAY BE UNREACHABLE IN ETMSP          RRDGED   1106
C     VERSIONS, BUT KEEP THEM IN. OTHERWISE LTSP WILL HAVE PROBLEM.     RRDGED   1107
C                                                                       RRDGED   1108
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED   1109
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=67,72)        RRDGED   1110
         IF(IOS.NE.0) GOTO 2400                                         RRDGED   1111
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED   1112
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=73,80)        RRDGED   1113
         IF(IOS.NE.0) GOTO 2400                                         RRDGED   1114
         CALL GETLIN(IUX,SIMBUF)                                        RRDGED   1115
         READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=81,86)        RRDGED   1116
         IF(IOS.NE.0) GOTO 2400                                         RRDGED   1117
         ITDDAT(JTLN)=86                                                RRDGED   1118
         JTLN=JTLN+86                                                   RRDGED   1119
      ENDIF                                                             RRDGED   1120
      CALL MCHECK (NLF,7,JTLN,'RRDGED')                                 RRDGED   1121
      GO TO 2200                                                        RRDGED   1122
C                                                                       RRDGED   1123
C  TYPE 4                                                               RRDGED   1124
C                                                                       RRDGED   1125
 1750 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1126
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,8)             RRDGED   1127
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1128
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1129
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=9,16)            RRDGED   1130
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1131
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1132
      IF(IGEN.GE.4.AND.IGEN.LE.7)THEN                                   RRDGED   1133
        IF(KLFO.EQ.0)THEN                                               RRDGED   1134
          READ(SIMBUF,8200,IOSTAT=IOS)LPGLFN,LPGID                      RRDGED   1135
          IF(IOS.NE.0) GOTO 2400                                        RRDGED   1136
          LPROG=MNEW(LPGLFN)                                            RRDGED   1137
          IF(LPROG.EQ.0)THEN                                            RRDGED   1138
            IEBK=1                                                      RRDGED   1139
            WRITE(MSG(1),4000) NLF,NGRI                                 RRDGED   1140
            WRITE(MSG(2),4600) LPGLFN                                   RRDGED   1141
            CALL PRTMSG(2)                                              RRDGED   1142
            LPGLFN=0                                                    RRDGED   1143
          ENDIF                                                         RRDGED   1144
        ELSE                                                            RRDGED   1145
          READ(SIMBUF,8300,IOSTAT=IOS)LPGNAM,LPGID                      RRDGED   1146
          IF(IOS.NE.0) GOTO 2400                                        RRDGED   1147
          CALL CHKBUS(LPGNAM,LPGLFN)                                    RRDGED   1148
          IF(LPGLFN.EQ.0)THEN                                           RRDGED   1149
            IEBK=1                                                      RRDGED   1150
            WRITE(MSG(1),4100) BUSNAM,NGRI                              RRDGED   1151
            WRITE(MSG(2),4700) LPGNAM                                   RRDGED   1152
            CALL PRTMSG(2)                                              RRDGED   1153
          ENDIF                                                         RRDGED   1154
        ENDIF                                                           RRDGED   1155
        ITDDAT(JTLN+17)=LPGLFN                                          RRDGED   1156
        ITDDAT(JTLN+18)=ILPGID                                          RRDGED   1157
      ELSE                                                              RRDGED   1158
        ITDDAT(JTLN+17)=0                                               RRDGED   1159
        ITDDAT(JTLN+18)=0                                               RRDGED   1160
      ENDIF                                                             RRDGED   1161
      IF(IGVNB.EQ.0)THEN                                                RRDGED   1162
        ITDDAT(JTLN)=18                                                 RRDGED   1163
        JTLN=JTLN+18                                                    RRDGED   1164
      ELSE                                                              RRDGED   1165
C                                                                       RRDGED   1166
C     READ IN THE SIMPIFIED BOILER AND ITS CONTROLS                     RRDGED   1167
C     NOTE THAT THE FOLLOWING CODE MAY BE UNREACHABLE IN ETMSP          RRDGED   1168
C     VERSIONS, BUT KEEP THEM IN. OTHERWISE LTSP WILL HAVE PROBLEM.     RRDGED   1169
C                                                                       RRDGED   1170
        CALL GETLIN(IUX,SIMBUF)                                         RRDGED   1171
        READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=19,24)         RRDGED   1172
        IF(IOS.NE.0) GOTO 2400                                          RRDGED   1173
        CALL GETLIN(IUX,SIMBUF)                                         RRDGED   1174
        READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=25,32)         RRDGED   1175
        IF(IOS.NE.0) GOTO 2400                                          RRDGED   1176
        CALL GETLIN(IUX,SIMBUF)                                         RRDGED   1177
        READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=33,38)         RRDGED   1178
        IF(IOS.NE.0) GOTO 2400                                          RRDGED   1179
        ITDDAT(JTLN)=38                                                 RRDGED   1180
        JTLN=JTLN+38                                                    RRDGED   1181
      ENDIF                                                             RRDGED   1182
      CALL MCHECK (NLF,8,JTLN,'RRDGED')                                 RRDGED   1183
      GO TO 2200                                                        RRDGED   1184
C                                                                       RRDGED   1185
C  TYPE 5                                                               RRDGED   1186
C                                                                       RRDGED   1187
 1800 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1188
      READ(SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,3)              RRDGED   1189
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1190
      ITDDAT(JTLN)=4                                                    RRDGED   1191
      JTLN=JTLN+4                                                       RRDGED   1192
      CALL MCHECK (NLF,9,JTLN,'RRDGED')                                 RRDGED   1193
      GO TO 2200                                                        RRDGED   1194
C                                                                       RRDGED   1195
C  TYPE 6                                                               RRDGED   1196
C                                                                       RRDGED   1197
 1850 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1198
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,7)             RRDGED   1199
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1200
      ITDDAT(JTLN)=7                                                    RRDGED   1201
      JTLN=JTLN+7                                                       RRDGED   1202
      CALL MCHECK (NLF,10,JTLN,'RRDGED')                                RRDGED   1203
      GOTO 2200                                                         RRDGED   1204
C                                                                       RRDGED   1205
C  TYPE 7                                                               RRDGED   1206
C                                                                       RRDGED   1207
 1900 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1208
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,8)             RRDGED   1209
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1210
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1211
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=9,10)            RRDGED   1212
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1213
      ITDDAT(JTLN)=10                                                   RRDGED   1214
      JTLN=JTLN+10                                                      RRDGED   1215
      CALL MCHECK (NLF,11,JTLN,'RRDGED')                                RRDGED   1216
      GOTO 2200                                                         RRDGED   1217
C                                                                       RRDGED   1218
C  TYPE 8                                                               RRDGED   1219
C                                                                       RRDGED   1220
 1950 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1221
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,8)             RRDGED   1222
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1223
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1224
      READ (SIMBUF,8700,IOSTAT=IOS) TDDAT(JTLN+9)                       RRDGED   1225
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1226
      ITDDAT(JTLN)=9                                                    RRDGED   1227
      JTLN=JTLN+9                                                       RRDGED   1228
      CALL MCHECK (NLF,11,JTLN,'RRDGED')                                RRDGED   1229
      GOTO 2200                                                         RRDGED   1230
C                                                                       RRDGED   1231
C  TYPE 20                                                              RRDGED   1232
C                                                                       RRDGED   1233
 2000 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1234
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,8)             RRDGED   1235
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1236
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1237
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=9,14),DTYP1,     RRDGED   1238
     * TDDAT(JTLN+15)                                                   RRDGED   1239
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1240
C  GET A DUMMY LINE, DATA ON THIS LINE ARE NOT USED                     RRDGED   1241
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1242
C                                                                       RRDGED   1243
      IF (DTYP1.GT.1.0) TDDAT(JTLN+15)=-TDDAT(JTLN+15)                  RRDGED   1244
      ITDDAT(JTLN)=15                                                   RRDGED   1245
      JTLN=JTLN+15                                                      RRDGED   1246
      CALL MCHECK (NLF,12,JTLN,'RRDGED')                                RRDGED   1247
      GO TO 2200                                                        RRDGED   1248
C                                                                       RRDGED   1249
C  TYPE 21, 22                                                          RRDGED   1250
C                                                                       RRDGED   1251
 2050 CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1252
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,8)             RRDGED   1253
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1254
      CALL GETLIN(IUX,SIMBUF)                                           RRDGED   1255
      READ (SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=9,11)            RRDGED   1256
      IF(IOS.NE.0) GOTO 2400                                            RRDGED   1257
      ITDDAT(JTLN)=11                                                   RRDGED   1258
      JTLN=JTLN+11                                                      RRDGED   1259
      CALL MCHECK (NLF,13,JTLN,'RRDGED')                                RRDGED   1260
      GOTO 2200                                                         RRDGED   1261
C                                                                       RRDGED   1262
C  TYPES WHICH HAVE NOT BEEN DEFINED                                    RRDGED   1263
C                                                                       RRDGED   1264
 2100 CONTINUE                                                          RRDGED   1265
      IF (KLFO.EQ.0) THEN                                               RRDGED   1266
         WRITE(MSG(1),4000) NLF,NGRI                                    RRDGED   1267
      ELSE                                                              RRDGED   1268
         WRITE(MSG(1),4100) BUSNAM,NGRI                                 RRDGED   1269
      END IF                                                            RRDGED   1270
      WRITE(MSG(2),4500) IGVN                                           RRDGED   1271
      CALL PRTMSG(2)                                                    RRDGED   1272
      SIMBUF='RRDGED: FATAL ERROR'                                      RRDGED   1273
      CALL ASTOP(SIMBUF,19)                                             RRDGED   1274
 2200 CONTINUE                                                          RRDGED   1275
C                                                                       RRDGED   1276
C-- READ THE GOVERNOR STABILIZER DATA IF THERE IS ANY                   RRDGED   1277
      IF (IGSTAN.GT.0) THEN                                             RRDGED   1278
        JGENDA(9,JJNT)=JTLN                                             RRDGED   1279
        CALL GETLIN(IUX,SIMBUF)                                         RRDGED   1280
        READ(SIMBUF,8700,IOSTAT=IOS) (TDDAT(JTLN+LK),LK=1,6)            RRDGED   1281
        IF(IOS.NE.0) GOTO 2400                                          RRDGED   1282
        JTLN=JTLN+6                                                     RRDGED   1283
      END IF                                                            RRDGED   1284
      GO TO 100                                                         RRDGED   1285
 2250 CONTINUE                                                          RRDGED   1286
C                                                                       RRDGED   1287
C     USER DEFINED GOVERNOR DATA                                        RRDGED   1288
C                                                                       RRDGED   1289
      JTLN=JTLN+2                                                       RRDGED   1290
      JTLN1=0                                                           RRDGED   1291
      NUF=4                                                             RRDGED   1292
      CALL RUDMDA(NUF,IUX,IU16,JTLN1,SIMBUF)                            RRDGED   1293
      IF(NUF.EQ.900) GO TO 2400                                         RRDGED   1294
      CALL MCHECK (NLF,13,JTLN,'RRDGED')                                RRDGED   1295
      GO TO 100                                                         RRDGED   1296
*IF LTSP                                                                RRDGED   1297
*ENDIF                                                                  RRDGED   1346
 2350 CONTINUE                                                          RRDGED   1347
C                                                                       RRDGED   1348
C     NOTE: IEBK=2 FOR GENERATOR NOT FOUND IN THE BASE LOAD FLOW.       RRDGED   1349
C           AN INTERACTIVE LOGIC CAN BE IMPLEMENTED HERE TO             RRDGED   1350
C           PROMPT USER HOW TO HANDLE THE SITUATION.                    RRDGED   1351
C           CURRENTLY, THE GENERATOR IS IGNORED.                        RRDGED   1352
C                                                                       RRDGED   1353
      IF (IEBK.EQ.2) IEBK=0                                             RRDGED   1354
C                                                                       RRDGED   1355
      RETURN                                                            RRDGED   1356
C                                                                       RRDGED   1357
 2400 CONTINUE                                                          RRDGED   1358
      WRITE(MSG(1),5700)                                                RRDGED   1359
      MSG(2)=SIMBUF                                                     RRDGED   1360
      WRITE(MSG(3),5800)                                                RRDGED   1361
      MSG(4)=LCARD(1)//LCARD(2)                                         RRDGED   1362
      CALL PRTMSG(4)                                                    RRDGED   1363
      SIMBUF='RRDGED: GENERATOR DATA ERROR'                             RRDGED   1364
      CALL ASTOP(SIMBUF,28)                                             RRDGED   1365
      RETURN                                                            RRDGED   1366
C                                                                       RRDGED   1367
C                                                                       RRDGED   1368
 4000 FORMAT(' *** ERROR GENERATOR AT BUS ',I5,' GID ',A4)              RRDGED   1369
 4100 FORMAT(' *** ERROR GENERATOR AT BUS ',A12,' GID ',A4)             RRDGED   1370
 4400 FORMAT('     MULTI-MASS REPRESENTATION IS INCORRECT. MASSN = ',I4)RRDGED   1371
 4500 FORMAT('     GOVERNOR TYPE ',I2,' IS INVALID.')                   RRDGED   1372
 4600 FORMAT('     SPECIFIED BUS FOR LOW PRESSURE UNIT ',I5,            RRDGED   1373
     +       ' DOES NOT EXIST')                                         RRDGED   1374
 4700 FORMAT('     SPECIFIED BUS FOR LOW PRESSURE UNIT ',A12,           RRDGED   1375
     +       ' DOES NOT EXIST')                                         RRDGED   1376
 4800 FORMAT('     NUMBER OF GENERATORS IN THE SYSTEM EXCEEDS THE LIMIT'RRDGED   1377
     1,' OF ',I4)                                                       RRDGED   1378
 4900 FORMAT(' *** ERROR BUS NUMBER OF THE FOLLOWING GENERATOR EXCEEDS' RRDGED   1379
     1,' THE LIMIT OF ',I5,':')                                         RRDGED   1380
 5000 FORMAT(' *** ERROR BUS NUMBER OF THE FOLLOWING GENERATOR IS'      RRDGED   1381
     1,' INVALID:')                                                     RRDGED   1382
 5100 FORMAT(' *** ERROR BUS NAME OF THE FOLLOWING GENERATOR IS NOT'    RRDGED   1383
     1,' IN THE BASE LOAD FLOW:')                                       RRDGED   1384
 5200 FORMAT('     THE GENERATOR IS NOT IN THE BASE LOAD FLOW')         RRDGED   1385
 5300 FORMAT('     BUS TYPE = 1 IN THE BASE LOAD FLOW. THE GENERATOR'   RRDGED   1386
     1,' IS IGNORED.')                                                  RRDGED   1387
 5400 FORMAT(1X,A80)                                                    RRDGED   1388
 5500 FORMAT('     STABILIZER SENSING BUS NAME ',A12,' IS NOT IN THE'   RRDGED   1389
     1,' BASE LOAD FLOW.')                                              RRDGED   1390
 5600 FORMAT('     GENERATOR BUS IS ASSUMED AS SENSING BUS.')           RRDGED   1391
 5700 FORMAT(' *** ERROR READING THE FOLLOWING CARD FOR GENERATOR'      RRDGED   1392
     1,' DATA:')                                                        RRDGED   1393
 5800 FORMAT('     THE FOLLOWING IS THE FIRST CARD OF THE GENERATOR'    RRDGED   1394
     1,' LAST READ:')                                                   RRDGED   1395
 5900 FORMAT('     CROWBAR TYPE ',I2,' IS INVALID.')                    RRDGED   1396
 6000 FORMAT('     EXCITER SENSING BUS NAME ',A12,' IS NOT IN THE'      RRDGED   1397
     1,' BASE LOAD FLOW.')                                              RRDGED   1398
 6100 FORMAT('     GENERATOR BUS IS ASSUMED AS SENSING BUS.')           RRDGED   1399
 6200 FORMAT('     EXCITER SENSING BUS NUMBER ',I5,' IS NOT IN THE'     RRDGED   1400
     1,' BASE LOAD FLOW.')                                              RRDGED   1401
 8100 FORMAT('     STABILIZER SENSING BUS NUMBER ',I5,' IS NOT IN THE'  RRDGED   1402
     1,' BASE LOAD FLOW.')                                              RRDGED   1403
C                                                                       RRDGED   1404
 8200 FORMAT(I5,1X,A4,3I5,3A4,A4,F10.5)                                 RRDGED   1405
 8300 FORMAT(A12,1X,A4,3I5,3A4,A4,F10.5)                                RRDGED   1406
 8400 FORMAT(16I5)                                                      RRDGED   1407
 8500 FORMAT(A12,I5,A12,5I5)                                            RRDGED   1408
 8600 FORMAT(A12,8I5)                                                   RRDGED   1409
 8700 FORMAT(8F10.5)                                                    RRDGED   1410
 8800 FORMAT(2F10.5,I5)                                                 RRDGED   1411
 8900 FORMAT(2F10.5,I10,F10.5)                                          RRDGED   1412
C                                                                       RRDGED   1413
C                                                                       RRDGED   1414
 6300 FORMAT('     FOR A USER DEFINED EXCITER')                         RRDGED   1415
 6400 FORMAT('     MODELS FOR THE STABILIZER, THE OVER AND UNDER')      RRDGED   1416
 6500 FORMAT('     EXCITATION CURRENT LIMITERS MUST',                   RRDGED   1417
     +       ' NOT BE USER DEFINED.')                                   RRDGED   1418
 6600 FORMAT('     FOR A USER DEFINED STABILIZER')                      RRDGED   1419
 6700 FORMAT('     A TORSIONAL FILTER IS NOT ALLOWED. ALSO MODELS FOR') RRDGED   1420
 6800 FORMAT('     THE OVER AND UNDER EXCITATION CURRENT LIMITERS MUST',RRDGED   1421
     +       ' NOT BE USER DEFINED.')                                   RRDGED   1422
 6900 FORMAT('     FOR A USER DEFINED UNDER EXCITATION CURRENT',        RRDGED   1423
     +       ' LIMITER')                                                RRDGED   1424
 7000 FORMAT('     A USER DEFINED OVER EXCITATION CURRENT LIMITER',     RRDGED   1425
     +       ' IS NOT ALLOWED.')                                        RRDGED   1426
C                                                                       RRDGED   1427
 7100 FORMAT(' *** ERROR - GENERATOR AT BUS ',I6, 'GID: ',A4)           RRDGED   1428
 7200 FORMAT(' *** ERROR - GENERATOR AT BUS ',A12, 'GID: ',A4)          RRDGED   1429
C                                                                       RRDGED   1430
      END                                                               RRDGED   1431
