CFPRIME TMONDA                                                          TMONDA      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 TMONDA(IUX)                                            TMONDA      3
CD                                                                      TMONDA      4
CD     TO TABULATE THE MONITORED LINES.                                 TMONDA      5
CD                                                                      TMONDA      6
      INCLUDE 'PARX.INS'                                                TMONDA      7
      INCLUDE 'CNPT.INS'                                                TMONDA      8
      INCLUDE 'CNIPTR.INS'                                              TMONDA      9
      INCLUDE 'CNMON.INS'                                               TMONDA     10
      INCLUDE 'CNSTN.INS'                                               TMONDA     11
C                                                                       TMONDA     12
      CHARACTER*4 CKID                                                  TMONDA     13
      EQUIVALENCE (JCKID,CKID)                                          TMONDA     14
C                                                                       TMONDA     15
      IF (NPFL.EQ.0) RETURN                                             TMONDA     16
      IL=61                                                             TMONDA     17
      NPFL12=0                                                          TMONDA     18
      DO 180 N=1,NPFL                                                   TMONDA     19
         NPFL12=NPFL12+12                                               TMONDA     20
         ITFK=MLFTB(NPFL12-10)                                          TMONDA     21
         JCKID=MACKT(NPFL12-9)                                          TMONDA     22
         CALL UPACKI(NPBNOI,NPBNOJ,ITFK)                                TMONDA     23
         NLFJ=NOLD(NPBNOI)                                              TMONDA     24
         NLFK=NOLD(NPBNOJ)                                              TMONDA     25
C                                                                       TMONDA     26
         RADXN=SQRT(RADX(NPFL12-2))                                     TMONDA     27
         CMAG=SQRT(RORIG(NPFL12-1)**2+XORIG(NPFL12)**2)                 TMONDA     28
         IF(CMAG.GT.0)THEN                                              TMONDA     29
            CANG=57.29578*ASIN(XORIG(NPFL12)/CMAG)                      TMONDA     30
         ELSE                                                           TMONDA     31
            CANG=0.0                                                    TMONDA     32
         ENDIF                                                          TMONDA     33
         ITFK=MLFTB(NPFL12-11)                                          TMONDA     34
         CALL UPACKI(MTYP,JJJ,ITFK)                                     TMONDA     35
         ITFK=MTYIRS(NPFL12-8)                                          TMONDA     36
         CALL UPACKI(JJJ,IRS,ITFK)                                      TMONDA     37
C                                                                       TMONDA     38
         J3=NPBNOI*3                                                    TMONDA     39
         K3=NPBNOJ*3                                                    TMONDA     40
         IF(IL.GE.60)THEN                                               TMONDA     41
            WRITE (IUX,2060)                                            TMONDA     42
            IL=5                                                        TMONDA     43
         ENDIF                                                          TMONDA     44
         WRITE(IUX,2050) N,NLFJ,INAME(J3-2),INAME(J3-1),INAME(J3)       TMONDA     45
     &      ,NLFK,INAME(K3-2),INAME(K3-1),INAME(K3),CKID(3:4),MTYP,IRS  TMONDA     46
     &      ,IRD(1,N),IRD(2,N),IRD(3,N),RADXN,CMAG,CANG                 TMONDA     47
         IL=IL+1                                                        TMONDA     48
C                                                                       TMONDA     49
 180  CONTINUE                                                          TMONDA     50
C                                                                       TMONDA     51
      RETURN                                                            TMONDA     52
C                                                                       TMONDA     53
 2050 FORMAT (I5,2(1X,I5,1X,3A4),3X,A2,2(1X,I4),1X,3A4,1X,2F10.5,F10.2) TMONDA     54
 2060 FORMAT (1H1,31X,' * * * MON. LINES AND RELAY DATA * * *',/,' ITEM'TMONDA     55
     1,2(2X,'BUS# STATION NAME'),1X,' CID MTYP  RSC',1X,'RELAY ID',8X,'RTMONDA     56
     2ADIUS',3X,'DISTANCE',5X,'ANGLE',/,1X,4('-'),2(1X,5('-'),1X,12('-')TMONDA     57
     3),3(1X,4('-')),1X,12('-'),4X,7('-'),2X,8('-'),5X,5('-'))          TMONDA     58
C                                                                       TMONDA     59
      END                                                               TMONDA     60
