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