CFPRIME IHWR                                                            IHWR        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 IHWR (IUNIT,IMODE,ITEM,IARRAY)                         IHWR        3
CD                                                                      IHWR        4
CD    TO PERFORM BLOCK READING OR WRITING OF AN INTEGER*2 ARRAY         IHWR        5
CD    FORM/INTO A SEQUENTIAL FILE.                                      IHWR        6
CD                                                                      IHWR        7
*IF -MI2                                                                IHWR        8
      INTEGER*2 IARRAY                                                  IHWR        9
*ENDIF                                                                  IHWR       10
      DIMENSION IARRAY(ITEM)                                            IHWR       11
      IF(IMODE.EQ.0)THEN                                                IHWR       12
      WRITE(IUNIT) IARRAY                                               IHWR       13
      ELSE                                                              IHWR       14
      READ (IUNIT) IARRAY                                               IHWR       15
      ENDIF                                                             IHWR       16
      RETURN                                                            IHWR       17
      END                                                               IHWR       18
      SUBROUTINE IFWR (IUNIT,IMODE,ITEM,IARRAY)                         IHWR       19
CD                                                                      IHWR       20
CD    TO PERFORM BLOCK READING OR WRITING OF AN INTEGER*4 ARRAY         IHWR       21
CD    FROM/INTO A SEQUENTIAL FILE.                                      IHWR       22
CD                                                                      IHWR       23
      INTEGER IARRAY(ITEM)                                              IHWR       24
      IF(IMODE.EQ.0)THEN                                                IHWR       25
      WRITE(IUNIT) IARRAY                                               IHWR       26
      ELSE                                                              IHWR       27
      READ (IUNIT) IARRAY                                               IHWR       28
      ENDIF                                                             IHWR       29
      RETURN                                                            IHWR       30
      END                                                               IHWR       31
      SUBROUTINE FLWR (IUNIT,IMODE,ITEM,ARRAY)                          IHWR       32
CD                                                                      IHWR       33
CD    TO PERFORM BLOCK READING OR WRITING OF A REAL ARRAY FROM/INTO     IHWR       34
CD    A SEQUENTIAL FILE.                                                IHWR       35
CD                                                                      IHWR       36
      DIMENSION ARRAY(ITEM)                                             IHWR       37
      IF(IMODE.EQ.0)THEN                                                IHWR       38
      WRITE(IUNIT) ARRAY                                                IHWR       39
      ELSE                                                              IHWR       40
      READ (IUNIT) ARRAY                                                IHWR       41
      ENDIF                                                             IHWR       42
      RETURN                                                            IHWR       43
      END                                                               IHWR       44
      SUBROUTINE FL2WR (IUNIT,IMODE,ITEM,ARRAY)                         IHWR       45
CD                                                                      IHWR       46
CD    TO PERFORM BLOCK READING OR WRITING OF AN TWO DIMENSIONAL REAL    IHWR       47
CD    ARRAY FROM/INTO A SEQUENTIAL FILE.                                IHWR       48
CD                                                                      IHWR       49
      DIMENSION ARRAY(2,ITEM)                                           IHWR       50
      IF(IMODE.EQ.0)THEN                                                IHWR       51
      WRITE(IUNIT) ARRAY                                                IHWR       52
      ELSE                                                              IHWR       53
      READ (IUNIT) ARRAY                                                IHWR       54
      ENDIF                                                             IHWR       55
      RETURN                                                            IHWR       56
      END                                                               IHWR       57
      SUBROUTINE CMPWR (IUNIT,IMODE,ITEM,ARRAY)                         IHWR       58
CD                                                                      IHWR       59
CD    TO PERFORM BLOCK READING OR WRITING OF A COMPLEX ARRAY FROM/INTO  IHWR       60
CD    A SEQUENTIAL FILE.                                                IHWR       61
CD                                                                      IHWR       62
      COMPLEX ARRAY(ITEM)                                               IHWR       63
      IF(IMODE.EQ.0)THEN                                                IHWR       64
      WRITE(IUNIT) ARRAY                                                IHWR       65
      ELSE                                                              IHWR       66
      READ (IUNIT) ARRAY                                                IHWR       67
      ENDIF                                                             IHWR       68
      RETURN                                                            IHWR       69
      END                                                               IHWR       70
      SUBROUTINE DAFLWR(IUNIT,N,NREC,ARRAY,LENG)                        IHWR       71
CD                                                                      IHWR       72
CD    TO PERFORM BLOCK READING OR WRITING OF A REAL ARRAY FROM/INTO     IHWR       73
CD    A DIRECT ACCESS FILE.                                             IHWR       74
CD                                                                      IHWR       75
      DIMENSION ARRAY(LENG)                                             IHWR       76
      IF(N.EQ.0)THEN                                                    IHWR       77
      WRITE(IUNIT,REC=NREC) ARRAY                                       IHWR       78
      ELSE                                                              IHWR       79
      READ(IUNIT,REC=NREC) ARRAY                                        IHWR       80
      ENDIF                                                             IHWR       81
      NREC=NREC+1                                                       IHWR       82
      RETURN                                                            IHWR       83
      END                                                               IHWR       84
      SUBROUTINE DAIWR(IUNIT,N,NREC,IARRAY,LENG)                        IHWR       85
CD                                                                      IHWR       86
CD    TO PERFORM BLOCK READING OR WRITING OF AN INTEGER*4 ARRAY         IHWR       87
CD    FROM/INTO DIRECT ACCESS FILE.                                     IHWR       88
CD                                                                      IHWR       89
      INTEGER IARRAY(LENG)                                              IHWR       90
      IF(N.EQ.0)THEN                                                    IHWR       91
      WRITE(IUNIT,REC=NREC) IARRAY                                      IHWR       92
      ELSE                                                              IHWR       93
      READ(IUNIT,REC=NREC) IARRAY                                       IHWR       94
      ENDIF                                                             IHWR       95
      NREC=NREC+1                                                       IHWR       96
      RETURN                                                            IHWR       97
      END                                                               IHWR       98
