CFPRIME MCHECK                                                          MCHECK      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 MCHECK(LFNO,IPOS,JLN,NAMER)                            MCHECK      3
CD                                                                      MCHECK      4
CD    TO CHECK FOR DYNAMIC DATA ARRAY DDAT OVERFLOW.                    MCHECK      5
CD                                                                      MCHECK      6
CD    INPUT OF ROUTINE:                                                 MCHECK      7
CD                                                                      MCHECK      8
CD    1. LFNO IS LOADFLOW BUS NUMBER                                    MCHECK      9
CD    2. IPOS IS THE POSITION INDICATOR OF THE ROUTINE                  MCHECK     10
CD    3. JLN IS THE TOTAL WORD LENGTH OF DDAT USED TO STORED DYNAMIC    MCHECK     11
CD       DATA.                                                          MCHECK     12
CD    4. NAMER IS THE NAME OF THE ROUTINE THAT CALLS                    MCHECK     13
CD                                                                      MCHECK     14
      INCLUDE 'PARX.INS'                                                MCHECK     15
      INCLUDE 'CNPARX.INS'                                              MCHECK     16
      INCLUDE 'CNMNEW.INS'                                              MCHECK     17
      INCLUDE 'CNLFDA.INS'                                              MCHECK     18
      INCLUDE 'CNMSG.INS'                                               MCHECK     19
C                                                                       MCHECK     20
      CHARACTER*6 NAMER                                                 MCHECK     21
C                                                                       MCHECK     22
      IF(JLN.LE.NXDAT)RETURN                                            MCHECK     23
      WRITE(MSG(1),4) NXDAT                                             MCHECK     24
      KK=MNEW(LFNO)*8                                                   MCHECK     25
      WRITE(MSG(2),5) LFNO,NAMES(KK-2),NAMES(KK-1),NAMES(KK)            MCHECK     26
     &                    ,IPOS,JLN,NAMER                               MCHECK     27
      CALL PRTMSG(2)                                                    MCHECK     28
4     FORMAT(' *** DYNAMIC DATA ITEMS EXCEED LIMIT OF',I7)              MCHECK     29
5     FORMAT(3X,'BUS#',I6,1X,3A4,2I8,' IN ROUTINE ',A6)                 MCHECK     30
      RETURN                                                            MCHECK     31
      END                                                               MCHECK     32
C  -------------------------------------------------                    MCHECK     33
      SUBROUTINE MCHNL(ICHAN,MXCHNL,MNBUF)                              MCHECK     34
CD                                                                      MCHECK     35
CD    TO CHECK FOR MONITORED ARRAY OVERFLOW.                            MCHECK     36
CD                                                                      MCHECK     37
CD    ROUTINE INPUT:                                                    MCHECK     38
CD                                                                      MCHECK     39
CD    1. ICHAN IS TOTAL NUMBER OF CHANNELS USED                         MCHECK     40
CD    2. MNBUF IS THE MAXIMUM NUMBER OF CHANNELS                        MCHECK     41
CD    3. MXCHNL IS THE LOGICAL INDICATOR EQUALS TRUE WHEN TOO MANY      MCHECK     42
CD       CHANNELS HAVE BEEN REQUESTED                                   MCHECK     43
CD                                                                      MCHECK     44
      LOGICAL MXCHNL                                                    MCHECK     45
      IF(ICHAN.GT.MNBUF)THEN                                            MCHECK     46
         MXCHNL=.TRUE.                                                  MCHECK     47
      ELSE                                                              MCHECK     48
         MXCHNL=.FALSE.                                                 MCHECK     49
      ENDIF                                                             MCHECK     50
      RETURN                                                            MCHECK     51
      END                                                               MCHECK     52
