C
C
      SUBROUTINE MBLNC
C
C
C     -----------------------------------------------------------
C
C       SUBROUTINE PURPOSE:
C       REALIZATION OF BALANCE OF MASS FLOW RATES.
C
C     -----------------------------------------------------------
C
      INCLUDE 'CMMNW.DAT'
C
      MBEGW=2
      DO 20 K=1,MNO
         MENDW=MEND(K)
         DO 10 J=MBEGW,MENDW
            N=MSL(J)
            IF (N.LT.0) N=-N
            Q(N)=0.
10       CONTINUE
         MBEGW=MENDW+2
20    CONTINUE
C
C       MASS BALANCE IS REALIZED ACCORDING TO THE AIRFLOW RATES IN
C     THE PRIMARY AIRWAYS.
C
      MBEGW=1
      DO 40 K=1,MNO
         MENDW=MEND(K)
         N=MSL(MBEGW)
         IF (N.LT.0) N=-N
         Q1=Q(N)
         M=MBEGW+1
         DO 30 J=M,MENDW
            N=MSL(J)
            FACT=1.
            IF (N.LT.0) THEN
            N=-N
            FACT=-1.
            ENDIF
            Q(N)=Q(N)+Q1*FACT
30       CONTINUE
         MBEGW=MENDW+1
40    CONTINUE
C
      RETURN
      END
