CFPRIME INITDC                                                          INITDC      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                                                                       INITDC      3
      SUBROUTINE  INITDC                                                INITDC      4
CD -------------------------------------------------------------------  INITDC      5
CD                                                                      INITDC      6
CD              *****     INITDCD ROUTINE   *****                       INITDC      7
CD                                                                      INITDC      8
CD -------------------------------------------------------------------  INITDC      9
CD                                                                      INITDC     10
CD       PURPOSE:  This subroutine provides the conversion from         INITDC     11
CD                 the pu voltage of the loadflow to the stability      INITDC     12
CD                 voltages (in Kv).                                    INITDC     13
CD                                                                      INITDC     14
CD                                                                      INITDC     15
CD       DEFINITION OF LOCAL VARIABLES:                                 INITDC     16
CD                 I      - 'do' loop index.                            INITDC     17
CD                 RATIO  -  current base.                              INITDC     18
CD                                                                      INITDC     19
CD -------------------------------------------------------------------  INITDC     20
      INCLUDE 'PARX.INS'                                                INITDC     21
      INCLUDE 'GRDC01.INS'                                              INITDC     22
      INCLUDE 'GRDC02.INS'                                              INITDC     23
      INCLUDE 'GRDC03.INS'                                              INITDC     24
      INCLUDE 'UDCJ.INS'                                                INITDC     25
C                                                                       INITDC     26
      COMMON /CONVST/ ICOMF(NDCC),ICEXT(NDCC)                           INITDC     27
C                                                                       INITDC     28
C---------------------------------------------------------------------  INITDC     29
C                                                                       INITDC     30
      RATIO = PDBASE / VDBASE                                           INITDC     31
C                                                                       INITDC     32
C     Fix up the converter voltages, currents and powers                INITDC     33
C                                                                       INITDC     34
      DO 20 J = 1, ICDC                                                 INITDC     35
         I=IDC(J)                                                       INITDC     36
         VDCONV(I) = VDCONV(I) * VDBASE                                 INITDC     37
         XDCONV(I) = XDCONV(I) * RATIO                                  INITDC     38
         PAHVDC(I) = PAHVDC(I) * PDBASE                                 INITDC     39
         QAHVDC(I) = QAHVDC(I) * PDBASE                                 INITDC     40
         IF(IABS(ICTYPE(I)) .NE. 1) Q2HVDC(I) = Q2HVDC(I) * PDBASE      INITDC     41
         CONTYP(I) = 'NONE'                                             INITDC     42
         ICOMF(I)=0                                                     INITDC     43
         ICEXT(I)=0                                                     INITDC     44
20    CONTINUE                                                          INITDC     45
C                                                                       INITDC     46
C     Also do the node voltages                                         INITDC     47
C                                                                       INITDC     48
      DO 40 I = 1, NUMNOD                                               INITDC     49
         VDCNOD(I) = VDCNOD(I) * VDBASE                                 INITDC     50
         XDNODE(I) = XDNODE(I) * RATIO                                  INITDC     51
40    CONTINUE                                                          INITDC     52
C                                                                       INITDC     53
C---------------------------------------------------------------------  INITDC     54
C                                                                       INITDC     55
      RETURN                                                            INITDC     56
C                                                                       INITDC     57
C---------------------------------------------------------------------  INITDC     58
C                                                                       INITDC     59
      END                                                               INITDC     60
