CFPRIME ACXREF                                                          ACXREF      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  ACXREF                                                ACXREF      3
CD -------------------------------------------------------------------  ACXREF      4
CD                                                                      ACXREF      5
CD              *****     ACXREF  ROUTINE   *****                       ACXREF      6
CD                                                                      ACXREF      7
CD -------------------------------------------------------------------  ACXREF      8
CD                                                                      ACXREF      9
CD       PURPOSE:  Set up pointers from converters to ac bus data in    ACXREF     10
CD                 storage (input) order                                ACXREF     11
CD                 Set up pointers from converter to ac bus voltage     ACXREF     12
CD                 storage in dc arrays                                 ACXREF     13
CD                 Set up pointer from ac converter bus position in listACXREF     14
CD                 to storage location of voltage                       ACXREF     15
CD                                                                      ACXREF     16
CD                                                                      ACXREF     17
CD       DEFINITION OF LOCAL VARIABLES:                                 ACXREF     18
CD                 FOUND  -  indicates ac bus name was found.           ACXREF     19
CD                 I      - 'do' loop index.                            ACXREF     20
CD                 LOCN   -  internal location for ac bus data, in the  ACXREF     21
CD                           copy of the ac tables.                     ACXREF     22
CD                 NAME   -  ac bus name.                               ACXREF     23
CD                 NP     -  internal location for ac bus data.         ACXREF     24
CD                 JPOSN   -  internal number for dc information.       ACXREF     25
CD                                                                      ACXREF     26
CD -------------------------------------------------------------------  ACXREF     27
      INCLUDE 'PARX.INS'                                                ACXREF     28
      INCLUDE 'GRDC01.INS'                                              ACXREF     29
      INCLUDE 'UDCF.INS'                                                ACXREF     30
C                                                                       ACXREF     31
      CHARACTER*12  NAME                                                ACXREF     32
C                                                                       ACXREF     33
C---------------------------------------------------------------------  ACXREF     34
C     Create an array, IDCBNU, which references the ac bus              ACXREF     35
C     from the dc converter position number (0 if blank).               ACXREF     36
C     IDCBN2 is for the second bus (0 if blank).                        ACXREF     37
C                                                                       ACXREF     38
      DO 20 I = 1, ICDC                                                 ACXREF     39
         IF(IDC(I) .NE. 0)THEN                                          ACXREF     40
            JPOSN = IDC(I)                                              ACXREF     41
            NAME(1:12) = DCCNAM(JPOSN)(17:28)                           ACXREF     42
            CALL ACFIND (NAME, NLF, LOCN)                               ACXREF     43
            IDCBNU(JPOSN) = LOCN                                        ACXREF     44
            NAME = DCCNA2(JPOSN)                                        ACXREF     45
            CALL ACFIND (NAME, NLF, LOCN)                               ACXREF     46
            IDCBN2(JPOSN) = LOCN                                        ACXREF     47
         END IF                                                         ACXREF     48
20    CONTINUE                                                          ACXREF     49
C                                                                       ACXREF     50
C---------------------------------------------------------------------  ACXREF     51
C                                                                       ACXREF     52
      RETURN                                                            ACXREF     53
C                                                                       ACXREF     54
C---------------------------------------------------------------------  ACXREF     55
C                                                                       ACXREF     56
      END                                                               ACXREF     57
