CFPRIME AXIS                                                            AXIS        1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*               Output Analysis Program for ETMSP (OAP)               *RIGHTE      4
C*               =======================================               *RIGHTE      5
C*                                                                     *RIGHTE     11
C*        copyright @(1993) Electric Power Research Institute          *RIGHTE     12
C*                                                                     *RIGHTE     13
C* EPRI reserves all rights in the software and associated             *RIGHTE     14
C* documentation as delivered. The software and its associated         *RIGHTE     15
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     16
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     17
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     18
C* of any changes or modifications to the software within two (2)      *RIGHTE     19
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     20
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     21
C* new designation sufficiently different from its then current        *RIGHTE     22
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     23
C* the current software as changed or modified.                        *RIGHTE     24
C*                                                                     *RIGHTE     25
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     26
C* directly from EPRI.                                                 *RIGHTE     27
C*                                                                     *RIGHTE     28
C* This program and supporting materials may be independently available*RIGHTE     29
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     30
C* distribution fee. The EPSC is a service of                          *RIGHTE     31
C*                                                                     *RIGHTE     32
C*                    Power Computing Company                          *RIGHTE     33
C*                    1930 Hi Line                                     *RIGHTE     34
C*                    Dallas, Tx 75207                                 *RIGHTE     35
C*                                                                     *RIGHTE     36
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     37
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     38
C*                                                                     *RIGHTE     39
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     40
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     41
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     42
C*    DOCUMENTATION; OR                                                *RIGHTE     43
C*                                                                     *RIGHTE     44
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     45
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     46
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     47
C*                                                                     *RIGHTE     48
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     49
C* THEREOF.                                                            *RIGHTE     50
C*                                                                     *RIGHTE     51
C***********************************************************************RIGHTE     52
      SUBROUTINE AXISXX (X,Y,LABEL,NFLG,AXLEN,ANGLE,FVAL,DV,DLTV,       AXIS        3
     *SIZE,ISTYL,XORY,TT1)                                              AXIS        4
CD                                                                      AXIS        5
CD             THIS ROUTINE DRAWS AND LABELS THE AXIS OF A PLOT.        AXIS        6
CD                                                                      AXIS        7
CD                                                                      AXIS        8
CD             CALLING PARAMETERS:                                      AXIS        9
CD                                                                      AXIS       10
CD             X,Y    : DEFINES THE STARTING COORDINATES OF THE AXIS LINAXIS       11
CD             LABEL  : CHARACTER STRING WHICH WILL BE USED TO          AXIS       12
CD                      GENERATE A LABEL FOR THE AXIS                   AXIS       13
CD             NFLG   : LOGICAL FLAG                                    AXIS       14
CD                      IF .TRUE. CAUSES THE ANNOTATIONS TO BE PLACED   AXIS       15
CD                      ABOVE THE AXIS                                  AXIS       16
CD                      IF .FALSE. CAUSE THE ANNOTATIONS TO BE PLACED   AXIS       17
CD                      BELOW THE AXIS                                  AXIS       18
CD             AXLEN  : LENGTH OF THE AXIS IN UNITS                     AXIS       19
CD             ANGLE  : ANGLE OF ROTATION (IN DEGREES) WITH RESPECT TO TAXIS       20
CD                      HORIZONTAL AXIS FOR THE AXIS TO BE DRAWN        AXIS       21
CD             FVAL   : THE STARTING VALUE OF THE AXIS                  AXIS       22
CD             DV     : DELTA X OR DELTA Y                              AXIS       23
CD                                                                      AXIS       24
CD                                                                      AXIS       25
C      INCLUDE 'PDICOM.INS/LIST'                                        AXIS       26
      CHARACTER LABEL*(*)                                               AXIS       27
      CHARACTER*1 XORY                                                  AXIS       28
      INTEGER TRMLEN                                                    AXIS       29
      LOGICAL   NFLG                                                    AXIS       30
      PARAMETER (RADN=0.01745329)                                       AXIS       31
*IF -BPA                                                                AXIS       32
      DATA NDEC /2/                                                     AXIS       33
*ENDIF                                                                  AXIS       34
                                                                        AXIS       35
*IF LAHEY                                                               AXIS       36
*ENDIF                                                                  AXIS       38
      ZSTAT = 0                                                         AXIS       39
      NC = TRMLEN(LABEL)                                                AXIS       40
      IF(NFLG)THEN                                                      AXIS       41
        SIDE=+1.0                                                       AXIS       42
      ELSE                                                              AXIS       43
        SIDE=-1.0                                                       AXIS       44
      ENDIF                                                             AXIS       45
      EXP = 0.0                                                         AXIS       46
      ADV = ABS(DV)                                                     AXIS       47
*IF PINDEP                                                              AXIS       48
*ENDIF                                                                  AXIS       50
      IF(ADV.NE.0.0)THEN                                                AXIS       51
 100    IF(ADV.GE.99.)THEN                                              AXIS       52
          ADV = ADV/10.                                                 AXIS       53
          EXP = EXP+1.                                                  AXIS       54
        ELSE IF(ADV.LT.0.01)THEN                                        AXIS       55
          ADV = ADV*10.                                                 AXIS       56
          EXP = EXP-1.                                                  AXIS       57
        ENDIF                                                           AXIS       58
        IF(ADV.LT.99.0 .AND. ADV.GE.0.01) GOTO 110                      AXIS       59
        GOTO 100                                                        AXIS       60
      ENDIF                                                             AXIS       61
 110  CONTINUE                                                          AXIS       62
*IF BPA                                                                 AXIS       63
*ENDIF                                                                  AXIS       77
      VAL = TT1*(10.0**(-EXP))                                          AXIS       78
      ADV = DV*(10.0**(-EXP))*DLTV                                      AXIS       79
      T2 = ANGLE*RADN                                                   AXIS       80
      SINA = SIN(T2)                                                    AXIS       81
      SIND = SINA*DLTV                                                  AXIS       82
      COSA = COS(T2)                                                    AXIS       83
      COSD = COSA*DLTV                                                  AXIS       84
      DX = -0.1                                                         AXIS       85
      IF(XORY.EQ.'X')THEN                                               AXIS       86
        DY = 0.15*SIDE - 0.05                                           AXIS       87
      ELSE                                                              AXIS       88
        DY = -0.0375                                                    AXIS       89
      ENDIF                                                             AXIS       90
      XX = X+DX*COSA-DY*SINA                                            AXIS       91
      XX = XX+(TT1-FVAL)/DV                                             AXIS       92
      YY = Y+DY*COSA+DX*SINA                                            AXIS       93
*IF -LAHEY                                                              AXIS       94
      NTIC = INT(AXLEN/DLTV) + 1                                        AXIS       95
*ENDIF                                                                  AXIS       96
*IF LAHEY                                                               AXIS       97
*ENDIF                                                                  AXIS      100
        DO 120 I=1,NTIC                                                 AXIS      101
*IF PINDEP                                                              AXIS      102
*ENDIF                                                                  AXIS      104
*IF VERSAP                                                              AXIS      105
*ENDIF                                                                  AXIS      107
*IF CALCOM                                                              AXIS      108
*ENDIF                                                                  AXIS      110
*IF LAHEY                                                               AXIS      111
*ENDIF                                                                  AXIS      113
          VAL = VAL+ADV                                                 AXIS      114
          XX = XX+COSD                                                  AXIS      115
          YY = YY+SIND                                                  AXIS      116
*IF LAHEY                                                               AXIS      117
*ENDIF                                                                  AXIS      119
 120    CONTINUE                                                        AXIS      120
*IF LAHEY                                                               AXIS      121
*ENDIF                                                                  AXIS      123
      IF(EXP.EQ.0.0)THEN                                                AXIS      124
        T2 = REAL(NC)                                                   AXIS      125
      ELSE                                                              AXIS      126
        T2 = REAL(NC+6)                                                 AXIS      127
      ENDIF                                                             AXIS      128
*IF -LAHEY                                                              AXIS      129
      DX = -SIZE*T2+0.5*AXLEN                                           AXIS      130
      DY = 0.325*SIDE - 0.075                                           AXIS      131
      DX = -SIZE*T2+0.5*AXLEN                                           AXIS      132
      DY = 0.325*SIDE - 0.075                                           AXIS      133
*ENDIF                                                                  AXIS      134
*IF LAHEY                                                               AXIS      135
*ENDIF                                                                  AXIS      138
      XX = X+DX*COSA-DY*SINA                                            AXIS      139
      YY = Y+DY*COSA+DX*SINA                                            AXIS      140
*IF LAHEY                                                               AXIS      141
*ENDIF                                                                  AXIS      143
*IF PINDEP                                                              AXIS      144
*ENDIF                                                                  AXIS      146
*IF VERSAP                                                              AXIS      147
*ENDIF                                                                  AXIS      149
*IF CALCOM                                                              AXIS      150
*ENDIF                                                                  AXIS      152
*IF LAHEY                                                               AXIS      153
*ENDIF                                                                  AXIS      155
      IF(EXP.NE.0.0)THEN                                                AXIS      156
*IF PINDEP                                                              AXIS      157
*ENDIF                                                                  AXIS      162
*IF VERSAP                                                              AXIS      163
*ENDIF                                                                  AXIS      165
*IF CALCOM                                                              AXIS      166
*ENDIF                                                                  AXIS      168
*IF LAHEY                                                               AXIS      169
*ENDIF                                                                  AXIS      173
        T2 = 5.                                                         AXIS      174
*IF -LAHEY                                                              AXIS      175
        XX = XX+(T2*COSA-0.8*SINA)*SIZE*2.0                             AXIS      176
        YY = YY+(T2*SINA+0.8*COSA)*SIZE*2.0                             AXIS      177
*ENDIF                                                                  AXIS      178
*IF LAHEY                                                               AXIS      179
*ENDIF                                                                  AXIS      182
*IF PINDEP                                                              AXIS      183
*ENDIF                                                                  AXIS      185
*IF VERSAP                                                              AXIS      186
*ENDIF                                                                  AXIS      188
*IF CALCOM                                                              AXIS      189
*ENDIF                                                                  AXIS      191
*IF LAHEY                                                               AXIS      192
*ENDIF                                                                  AXIS      194
      ENDIF                                                             AXIS      195
*IF PINDEP                                                              AXIS      196
*ENDIF                                                                  AXIS      198
*IF VERSAP                                                              AXIS      199
*ENDIF                                                                  AXIS      201
*IF CALCOM                                                              AXIS      202
*ENDIF                                                                  AXIS      204
                                                                        AXIS      205
      XX = X+AXLEN*COSA                                                 AXIS      206
      YY = Y+AXLEN*SINA                                                 AXIS      207
      IF(XORY.EQ.'X')THEN                                               AXIS      208
*IF PINDEP                                                              AXIS      209
*ENDIF                                                                  AXIS      226
*IF VERSAP                                                              AXIS      227
*ENDIF                                                                  AXIS      251
*IF CALCOM                                                              AXIS      252
*ENDIF                                                                  AXIS      276
      ENDIF                                                             AXIS      277
      RETURN                                                            AXIS      278
      END                                                               AXIS      279
