C
C
      SUBROUTINE  HUMI
C
C     -----------------------------------------------------------------
C
C       SUBROUTINE PURPOSE:
C       EVALUATION OF HUMIDITY RATIO IN JUNCTIONS.
C
C     -----------------------------------------------------------------
C
      INCLUDE 'CMMNW.DAT'
C
      DO 10 J=1,NJ
         SUMQ(J)=0.0
         SUMW(J)=0.0
10    CONTINUE
      DO 30 I=1,NB
         JN=JF(I)
         DO 20 J=1,NJ
            IF (JNO(J).EQ.JN) THEN
               TC=TRD(I)
               IF (TC.GT.210.0) TC=210.0
               IF (TC.LE.122.0) THEN
                  HU=-1.0682+0.0794*TC-0.00129*TC*TC+1.26E-5*TC**3
               ELSE
                  HU=-33.786+0.97*TC-9.305E-3*TC*TC+3.65E-5*TC**3
               ENDIF
               PV=RDH2O(I)*101.35/(RDH2O(I)+0.622)
               IF (PV.GT.HU) RDH2O(I)=0.622*HU/(101.35-HU)
               SUMQ(J)=SUMQ(J)+Q(I)
               SUMW(J)=SUMW(J)+RDH2O(I)*Q(I)
               GO TO 30
            ENDIF
20       CONTINUE
30    CONTINUE
      DO 40 J=1,NJ
        IF (JNO(J).NE.JSTART.AND.JNO(J).LT.900) PRH2O(J)=SUMW(J)/SUMQ(J)
40    CONTINUE
C
      RETURN
      END
