CFPRIME RIMODA                                                          RIMODA      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 RIMODA(IUX,IUY,IEBK)                                   RIMODA      3
CD                                                                      RIMODA      4
CD    TO READ INDUCTION MOTOR DATA.                                     RIMODA      5
CD                                                                      RIMODA      6
      INCLUDE 'PARX.INS'                                                RIMODA      7
      INCLUDE 'CNMNEW.INS'                                              RIMODA      8
      INCLUDE 'CNFLAG.INS'                                              RIMODA      9
      INCLUDE 'CNPARX.INS'                                              RIMODA     10
      INCLUDE 'CNJPT.INS'                                               RIMODA     11
      INCLUDE 'CNJDAT.INS'                                              RIMODA     12
      INCLUDE 'CNTMDA.INS'                                              RIMODA     13
      INCLUDE 'CNTGED.INS'                                              RIMODA     14
      INCLUDE 'CNMSG.INS'                                               RIMODA     15
C                                                                       RIMODA     16
      CHARACTER*40 LCARD(2)                                             RIMODA     17
      CHARACTER*80 SIMBUF                                               RIMODA     18
      CHARACTER*12 BUSNAM                                               RIMODA     19
      CHARACTER*4  JINDM                                                RIMODA     20
      CHARACTER*5 EDATA                                                 RIMODA     21
      DATA EDATA/'EDATA'/                                               RIMODA     22
C                                                                       RIMODA     23
      LDEB=(JDEB(7).NE.0)                                               RIMODA     24
C                                                                       RIMODA     25
      LCARD(1)='      START OF INDUCTION MOTOR DATA     '               RIMODA     26
      LCARD(2)='                                        '               RIMODA     27
C                                                                       RIMODA     28
C   READING INDUCTION MOTOR DATA                                        RIMODA     29
C                                                                       RIMODA     30
  100 CONTINUE                                                          RIMODA     31
      CALL GETLIN(IUX,SIMBUF)                                           RIMODA     32
      IF(SIMBUF(1:5).EQ.EDATA)GOTO 130                                  RIMODA     33
      IF(KLFO.EQ.0)THEN                                                 RIMODA     34
      READ (SIMBUF,1000,IOSTAT=IOS) NLF,JINDM,(ITDDAT(JTLN+J),J=1,4)    RIMODA     35
      IF(IOS.NE.0) GOTO 500                                             RIMODA     36
      IF (NLF.GT.N99999) THEN                                           RIMODA     37
         WRITE(MSG(2),1070) N99999                                      RIMODA     38
         MSG(1)=SIMBUF                                                  RIMODA     39
         CALL PRTMSG(2)                                                 RIMODA     40
         CALL ASTOP('RIMODA: FATAL ERROR',19)                           RIMODA     41
      END IF                                                            RIMODA     42
      ELSE                                                              RIMODA     43
      READ (SIMBUF,1030,IOSTAT=IOS) BUSNAM,JINDM                        RIMODA     44
     *      ,(ITDDAT(JTLN+J),J=1,4)                                     RIMODA     45
      IF(IOS.NE.0) GOTO 500                                             RIMODA     46
      CALL CHKBUS(BUSNAM,NLF)                                           RIMODA     47
           IF(NLF.EQ.0)THEN                                             RIMODA     48
           IEBK=1                                                       RIMODA     49
           WRITE(MSG(1),1040) SIMBUF                                    RIMODA     50
           CALL PRTMSG(1)                                               RIMODA     51
           ENDIF                                                        RIMODA     52
      ENDIF                                                             RIMODA     53
 110  CONTINUE                                                          RIMODA     54
      LCARD(1)=SIMBUF(1:40)                                             RIMODA     55
      LCARD(2)=SIMBUF(41:80)                                            RIMODA     56
      NTYPE=ITDDAT(JTLN+1)                                              RIMODA     57
C                                                                       RIMODA     58
      JMOTL=JMOTL+1                                                     RIMODA     59
      IF(JMOTL.GT.NXMT)GOTO 120                                         RIMODA     60
      JMOTB(JMOTL)=NLF                                                  RIMODA     61
      INDMID(JMOTL)=JINDM                                               RIMODA     62
      JJMDAT(JMOTL)=JTLN                                                RIMODA     63
C                                                                       RIMODA     64
      CALL GETLIN(IUX,SIMBUF)                                           RIMODA     65
      READ (SIMBUF,1010,IOSTAT=IOS) (TDDAT(JTLN+J),J=5,9)               RIMODA     66
     +,(TDDAT(JTLN+J),J=27,28)                                          RIMODA     67
      IF(IOS.NE.0) GOTO 500                                             RIMODA     68
      CALL GETLIN(IUX,SIMBUF)                                           RIMODA     69
      READ (SIMBUF,1010,IOSTAT=IOS) (TDDAT(JTLN+J),J=19,26)             RIMODA     70
      IF(IOS.NE.0) GOTO 500                                             RIMODA     71
      CALL GETLIN(IUX,SIMBUF)                                           RIMODA     72
      READ (SIMBUF,1010,IOSTAT=IOS) (TDDAT(JTLN+J),J=10,13)             RIMODA     73
      IF(IOS.NE.0) GOTO 500                                             RIMODA     74
      CALL GETLIN(IUX,SIMBUF)                                           RIMODA     75
      READ (SIMBUF,1010,IOSTAT=IOS) (TDDAT(JTLN+J),J=14,18)             RIMODA     76
      IF(IOS.NE.0) GOTO 500                                             RIMODA     77
C                                                                       RIMODA     78
      JTLN=JTLN+26                                                      RIMODA     79
      IF(NTYPE.EQ.3.OR.NTYPE.EQ.8)JTLN=JTLN+2                           RIMODA     80
      CALL MCHECK (NLF,13,JTLN,'RIMODA')                                RIMODA     81
      GOTO 100                                                          RIMODA     82
  120 CONTINUE                                                          RIMODA     83
      WRITE (MSG(1),1020) NXMT,SIMBUF                                   RIMODA     84
      CALL PRTMSG(1)                                                    RIMODA     85
      IEBK=2                                                            RIMODA     86
      GOTO 100                                                          RIMODA     87
C                                                                       RIMODA     88
  130 CONTINUE                                                          RIMODA     89
C                                                                       RIMODA     90
      IF(IEBK.EQ.0)RETURN                                               RIMODA     91
C                                                                       RIMODA     92
      SIMBUF='RIMODA: INDUCTION MOTOR DATA ERROR'                       RIMODA     93
      CALL ASTOP(SIMBUF,34)                                             RIMODA     94
  500 CONTINUE                                                          RIMODA     95
      WRITE(MSG(1),1050)                                                RIMODA     96
      MSG(2)=LCARD(1)//LCARD(2)                                         RIMODA     97
      WRITE(MSG(3),1060)                                                RIMODA     98
      MSG(4)=SIMBUF                                                     RIMODA     99
      CALL PRTMSG(4)                                                    RIMODA    100
      SIMBUF='RIMODA: INDUCTION MOTOR DATA MIX UP ERROR'                RIMODA    101
      CALL ASTOP(SIMBUF,41)                                             RIMODA    102
C                                                                       RIMODA    103
 1000 FORMAT (I5,1X,A4,4I5)                                             RIMODA    104
 1010 FORMAT (8F10.5)                                                   RIMODA    105
 1020 FORMAT(' *** ERROR NO. OF MOTORS EXCEEDS THE LIMIT'               RIMODA    106
     &,' OF',I4)                                                        RIMODA    107
 1030 FORMAT (A12,1X,A4,4I5)                                            RIMODA    108
 1040 FORMAT(' *** INDUCTION MOTOR BUS NAME ERROR CHECK THE '           RIMODA    109
     &,'FOLLOWING DATA CARD')                                           RIMODA    110
 1050 FORMAT(' *** READ ERROR AT THE CARD:')                            RIMODA    111
 1060 FORMAT(11X,'THIS IS THE FIRST CARD OF THE',                       RIMODA    112
     & ' INDUCTION MOTOR LAST READ:')                                   RIMODA    113
 1070 FORMAT(' *** ERROR BUS NUMBER OF THE ABOVE IND. MOTOR EXCEEDED'   RIMODA    114
     &,I6)                                                              RIMODA    115
      END                                                               RIMODA    116
