CFPRIME EPGOCV                                                          EPGOCV      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
C                                                                       EPGOCV      3
      SUBROUTINE EPGOCV (IGVN,ITBD,EPGOV,GMBASE,GOVB)                   EPGOCV      4
CD                                                                      EPGOCV      5
CD    TO CONVERT BPA/WSCC/EPRI(OLD) GOVERNOR MODELS TO EPRI(NEW) MODELS.EPGOCV      6
CD                                                                      EPGOCV      7
      INCLUDE 'PARX.INS'                                                EPGOCV      8
      INCLUDE 'CNFLAG.INS'                                              EPGOCV      9
      INCLUDE 'CNUNIT.INS'                                              EPGOCV     10
      INCLUDE 'CNMSG.INS'                                               EPGOCV     11
C                                                                       EPGOCV     12
      CHARACTER*80 GOVB                                                 EPGOCV     13
      DIMENSION EPGOV(*)                                                EPGOCV     14
C                                                                       EPGOCV     15
      LDEB=(JDEB(96).NE.0)                                              EPGOCV     16
C                                                                       EPGOCV     17
C     GMBASE=> MACHINE RATING                                           EPGOCV     18
C                                                                       EPGOCV     19
      ITBD=0                                                            EPGOCV     20
      CALL FMOVE(0,EPGOV,EPGOV,J9V1D)                                   EPGOCV     21
C                                                                       EPGOCV     22
C      -------------------------------------------                      EPGOCV     23
C      - BPA/WSCC/EPRI(OLD) G   --> PROGRAM TYPE IGVN 8       -         EPGOCV     24
C      -------------------------------------------                      EPGOCV     25
C                                                                       EPGOCV     26
       IF (GOVB(2:2).EQ.'G') THEN                                       EPGOCV     27
          READ(GOVB,1000) GPMAX,GR,GT1,GT2,GT3,GT4,GT5,GF,GDD           EPGOCV     28
          IF(LDEB)WRITE(IUD6,1010) GOVB(1:2),GOVB(4:15),GPMAX,GR        EPGOCV     29
     &,GT1,GT2,GT3,GT4,GT5,GF,GDD                                       EPGOCV     30
          IGVN=8                                                        EPGOCV     31
C                                                                       EPGOCV     32
          EPGOV(1)=1.0/GR                                               EPGOCV     33
          EPGOV(2)=GT1                                                  EPGOCV     34
          EPGOV(3)=GT2                                                  EPGOCV     35
          EPGOV(4)=GT3                                                  EPGOCV     36
          EPGOV(5)=GPMAX/GMBASE                                         EPGOCV     37
          EPGOV(6)=0.0                                                  EPGOCV     38
          EPGOV(7)=GT4                                                  EPGOCV     39
          EPGOV(8)=GT5                                                  EPGOCV     40
          EPGOV(9)=GT5*GF                                               EPGOCV     41
C                                                                       EPGOCV     42
C      -------------------------------------------                      EPGOCV     43
C      - BPA/WSCC/EPRI(OLD) H   --> PROGRAM TYPE IGVN 21       -        EPGOCV     44
C      -------------------------------------------                      EPGOCV     45
C                                                                       EPGOCV     46
       ELSEIF (GOVB(2:2).EQ.'H') THEN                                   EPGOCV     47
          READ(GOVB,1000) GPMAX,GR,GTG,GTP,GTD,HTW,VELC,VELO,GDD        EPGOCV     48
          IF(LDEB)WRITE(IUD6,1010) GOVB(1:2),GOVB(4:15),GPMAX,GR        EPGOCV     49
     &,GTG,GTP,GTD,HTW,VELC,VELO,GDD                                    EPGOCV     50
          IGVN=21                                                       EPGOCV     51
C                                                                       EPGOCV     52
          EPGOV(1)=GPMAX/GMBASE                                         EPGOCV     53
          EPGOV(2)=GR                                                   EPGOCV     54
          EPGOV(3)=GTG                                                  EPGOCV     55
          EPGOV(4)=GTP                                                  EPGOCV     56
          EPGOV(5)=GTD                                                  EPGOCV     57
          EPGOV(6)=GDD                                                  EPGOCV     58
          EPGOV(7)=1.0                                                  EPGOCV     59
          EPGOV(8)=0.0                                                  EPGOCV     60
          EPGOV(9)=HTW*2.0                                              EPGOCV     61
          EPGOV(10)=VELO                                                EPGOCV     62
          EPGOV(11)=VELC                                                EPGOCV     63
C                                                                       EPGOCV     64
C      ---------------------------------------------                    EPGOCV     65
C      - BPA/WSCC/EPRI(OLD) C   --> NOT RECOMENDED TO BE USED           EPGOCV     66
C      ---------------------------------------------                    EPGOCV     67
C                                                                       EPGOCV     68
C                                                                       EPGOCV     69
C      IF (GOVB(2:2).EQ.'C') THEN                                       EPGOCV     70
C          READ(GOVB,1000) GPMAX,GR,GT1,GT2,GT3,GT4,GT5,GF,GDD          EPGOCV     71
C          IF (LDEB)WRITE(6,1010) GOVB(1:2),GOVB(4:15),GPMAX,GR,GT1,    EPGOCV     72
C     1                   GTG,GT2,GTP,GT3,GT4,GT5,GF,GDD                EPGOCV     73
C          IGVN=2                               ! FOR NOW               EPGOCV     74
C         DO CONVERSION                                                 EPGOCV     75
C            --                                                         EPGOCV     76
C            --                                                         EPGOCV     77
C                                                                       EPGOCV     78
C          GOTO 500                                                     EPGOCV     79
C       ENDIF                                                           EPGOCV     80
C                                                                       EPGOCV     81
C                                                                       EPGOCV     82
C      -----------------------------------------------------------------EPGOCV     83
C      - BPA/WSCC/EPRI(OLD) S   --> SPEED GOVERNING SYSTEM OF PROGRAM TYEPGOCV     84
C      -----------------------------------------------------------------EPGOCV     85
C                                                                       EPGOCV     86
       ELSEIF (GOVB(2:2).EQ.'S') THEN                                   EPGOCV     87
          READ(GOVB,1030) GPMAX,GPMIN,GR,GT1,GT2,GT3,VELOP,VELCL        EPGOCV     88
          IF(LDEB)WRITE(IUD6,1010) GOVB(1:2),GOVB(4:15), GPMAX,GPMIN,   EPGOCV     89
     1                  GR,GT1,GT2,GT3,VELOP,VELCL                      EPGOCV     90
          IGVN=4                                                        EPGOCV     91
          ITBD=1                                                        EPGOCV     92
C         DO CONVERSION                                                 EPGOCV     93
C            --                                                         EPGOCV     94
          EPGOV(1)=1.0/GR                                               EPGOCV     95
          EPGOV(2)=GT1                                                  EPGOCV     96
          EPGOV(3)=GT2                                                  EPGOCV     97
          EPGOV(4)=GT3                                                  EPGOCV     98
          EPGOV(5)=VELOP                                                EPGOCV     99
          EPGOV(6)=-VELCL                                               EPGOCV    100
          EPGOV(7)=GPMAX/GMBASE                                         EPGOCV    101
C                                                                       EPGOCV    102
C      -------------------------------------------                      EPGOCV    103
C      - BPA/WSCC/EPRI(OLD) W   --> PROGRAM TYPE IGVN 22       -        EPGOCV    104
C      -------------------------------------------                      EPGOCV    105
C                                                                       EPGOCV    106
C                                                                       EPGOCV    107
C                                                                       EPGOCV    108
C   NOTE TYPE W GOVERNOR MUST HAVE A TYPE W TURBINE                     EPGOCV    109
C                                                                       EPGOCV    110
       ELSEIF (GOVB(2:2).EQ.'W') THEN                                   EPGOCV    111
          READ(GOVB,1030) GPMAX,GPMIN,GR,GT1,GT2,GT3,VELOP,VELCL        EPGOCV    112
          IF(LDEB)WRITE(IUD6,1010) GOVB(1:2),GOVB(4:15),GPMAX,GPMIN,    EPGOCV    113
     1                  GR,GT1,GT2,GT3,VELOP,VELCL                      EPGOCV    114
          IGVN=22                                                       EPGOCV    115
          ITBD=1                                                        EPGOCV    116
          EPGOV(1)=GPMAX/GMBASE                                         EPGOCV    117
          EPGOV(2)=GR                                                   EPGOCV    118
          EPGOV(3)=GT1                                                  EPGOCV    119
          EPGOV(4)=GT2                                                  EPGOCV    120
          EPGOV(5)=GT3                                                  EPGOCV    121
          EPGOV(7)=1.0                                                  EPGOCV    122
          EPGOV(8)=0.0                                                  EPGOCV    123
C                                                                       EPGOCV    124
C                                                                       EPGOCV    125
      ELSE                                                              EPGOCV    126
         WRITE(MSG(1),1020) GOVB(4:16)                                  EPGOCV    127
         WRITE(MSG(2),1040) GOVB(2:2)                                   EPGOCV    128
         CALL PRTMSG(2)                                                 EPGOCV    129
         IGVN=0                                                         EPGOCV    130
      ENDIF                                                             EPGOCV    131
C                                                                       EPGOCV    132
C     NORMAL EXIST POINT FOR SUCCESSFUL CONVERSION                      EPGOCV    133
C                                                                       EPGOCV    134
      RETURN                                                            EPGOCV    135
C                                                                       EPGOCV    136
 1000 FORMAT(BZ,T17,F6.1,T23,F5.3,T28,F5.3,T33,F5.3,T38,F5.3,T43,F5.3,  EPGOCV    137
     1       T48,F5.3,T53,F5.3,T58,F5.3)                                EPGOCV    138
 1010 FORMAT(1X,'! DEBUG (EPGOCV) GOVERNOR TYPE ',A2,' BUS:', A12,      EPGOCV    139
     1       /1X,F10.3,13(1X,F7.3))                                     EPGOCV    140
 1020 FORMAT(' *** WARNING GENERATOR AT BUS: ',A)                       EPGOCV    141
 1040 FORMAT(5X,'TYPE ',A                                               EPGOCV    142
     *,' GOVERNOR (EPGOCV) IS NOT CONVERTABLE TO A NEW EPRI MODEL')     EPGOCV    143
 1030 FORMAT(BZ,T17,F6.1,T23,F6.1,T29,F5.3,T34,F5.3,T39,F5.3,T44,F5.3   EPGOCV    144
     1      ,T49,F6.1,T55,F6.1)                                         EPGOCV    145
C!!!!NOTE!!!      \__and____\_____FORMAT HAS NOT BEEN CONFIRMED !!!     EPGOCV    146
C                                                                       EPGOCV    147
C                                                                       EPGOCV    148
      END                                                               EPGOCV    149
