CFPRIME MOVE                                                            MOVE        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 LMOVE(N,LOGI,K)                                        MOVE        3
CD                                                                      MOVE        4
CD    TO INITIALIZE THE INCOMING LOGICAL ARRAY.                         MOVE        5
CD                                                                      MOVE        6
      INTEGER*4 IAC,IORDER(*),JTOA(*),JFRA(*)                           MOVE        7
      INTEGER*4 IFRA,ITOA                                               MOVE        8
*IF -MI2                                                                MOVE        9
      INTEGER*2 LFRA,LTOA                                               MOVE       10
*ENDIF                                                                  MOVE       11
      DIMENSION FRA(*), TOA(*), IFRA(*), ITOA(*),LFRA(*),LTOA(*)        MOVE       12
      LOGICAL LOGI(*)                                                   MOVE       13
      IF (N.EQ.0) GO TO 150                                             MOVE       14
      DO 140 J=1,K                                                      MOVE       15
      LOGI(J)=.TRUE.                                                    MOVE       16
140   CONTINUE                                                          MOVE       17
      RETURN                                                            MOVE       18
150   CONTINUE                                                          MOVE       19
      DO 160 J=1,K                                                      MOVE       20
      LOGI(J)=.FALSE.                                                   MOVE       21
160   CONTINUE                                                          MOVE       22
      RETURN                                                            MOVE       23
      ENTRY MOVE (N,IFRA,ITOA,K)                                        MOVE       24
CD                                                                      MOVE       25
CD    TO INITIALIZE THE INCOMING INTEGER*4 ARRAY.                       MOVE       26
CD                                                                      MOVE       27
      IF (N.EQ.0) GO TO 20                                              MOVE       28
      NN=N                                                              MOVE       29
      DO 10 J=1,K                                                       MOVE       30
      ITOA(NN+J)=IFRA(J)                                                MOVE       31
10    CONTINUE                                                          MOVE       32
      RETURN                                                            MOVE       33
20    CONTINUE                                                          MOVE       34
      DO 30 J=1,K                                                       MOVE       35
      IFRA(J)=0                                                         MOVE       36
30    CONTINUE                                                          MOVE       37
      RETURN                                                            MOVE       38
C                                                                       MOVE       39
      ENTRY HMOVE(N,LFRA,LTOA,K)                                        MOVE       40
CD                                                                      MOVE       41
CD    TO INITIALIZE THE INCOMING INTEGER*2 ARRAY.                       MOVE       42
CD                                                                      MOVE       43
      IF (N.EQ.0) GO TO 120                                             MOVE       44
      NN=N                                                              MOVE       45
      DO 110 J=1,K                                                      MOVE       46
      LTOA(NN+J)=LFRA(J)                                                MOVE       47
110   CONTINUE                                                          MOVE       48
      RETURN                                                            MOVE       49
120   CONTINUE                                                          MOVE       50
      DO 130 J=1,K                                                      MOVE       51
      LFRA(J)=0                                                         MOVE       52
130   CONTINUE                                                          MOVE       53
      RETURN                                                            MOVE       54
C                                                                       MOVE       55
      ENTRY FMOVE (N,FRA,TOA,K)                                         MOVE       56
CD                                                                      MOVE       57
CD    TO INITIALIZE THE INCOMING REAL ARRAY.                            MOVE       58
CD                                                                      MOVE       59
      IF (N.EQ.0) GO TO 50                                              MOVE       60
      NN=N                                                              MOVE       61
      DO 40 J=1,K                                                       MOVE       62
      TOA(NN+J)=FRA(J)                                                  MOVE       63
40    CONTINUE                                                          MOVE       64
      RETURN                                                            MOVE       65
50    CONTINUE                                                          MOVE       66
      DO 60 J=1,K                                                       MOVE       67
      FRA(J)=0                                                          MOVE       68
60    CONTINUE                                                          MOVE       69
      RETURN                                                            MOVE       70
C                                                                       MOVE       71
      ENTRY SMOVE (JFRA,JTOA,IORDER,LAST)                               MOVE       72
CD                                                                      MOVE       73
CD    TO SORT AND MOVE THE INCOMING INTEGER*4 ARRAY.                    MOVE       74
CD                                                                      MOVE       75
      DO 70 I=1,LAST                                                    MOVE       76
70    JTOA(I)=0                                                         MOVE       77
      DO 80 J=1,LAST                                                    MOVE       78
      IAC=0                                                             MOVE       79
      IF (IORDER(J).LE.LAST) IAC=JFRA(J)                                MOVE       80
      ITO=IORDER(J)                                                     MOVE       81
      JTOA(ITO)=IAC                                                     MOVE       82
80    CONTINUE                                                          MOVE       83
      RETURN                                                            MOVE       84
C                                                                       MOVE       85
      ENTRY SFMOVE (FRA,TOA,IORDER,LAST)                                MOVE       86
CD                                                                      MOVE       87
CD    TO SORT AND MOVE THE INCOMING REAL ARRAY.                         MOVE       88
CD                                                                      MOVE       89
      DO 90 I=1,LAST                                                    MOVE       90
90    TOA(I)=0.0                                                        MOVE       91
      DO 100 J=1,LAST                                                   MOVE       92
      XIAC=0.                                                           MOVE       93
      IF (IORDER(J).LE.LAST) XIAC=FRA(J)                                MOVE       94
      ITO=IORDER(J)                                                     MOVE       95
      TOA(ITO)=XIAC                                                     MOVE       96
100   CONTINUE                                                          MOVE       97
      RETURN                                                            MOVE       98
C                                                                       MOVE       99
      END                                                               MOVE      100
