      SUBROUTINE ENDDAY 
C      SUBROUTINE ENDDAY (COMFTT, WEIGHT, WTFCT, XHUM1)
C
C-----PERFORMS CALCULATIONS FOR THE END OF THE DAY
C
C-----CONSTANTS
CMDK NHRO
CMDK NHRP
CMDK NOUTDY
C
C-----ARGUMENTS
C      REAL XHUM1(22)
C     REAL COMFTT(11,21)
C
C-----COMMON BLOCKS
CMDK OUTPUT
CMDK QUAYLE
C
C *** SUMMARIZE AND PRINT COMFORT ZONE VALUES
C
C      IF (ICOMF.EQ.0) THEN
C--------CHECK FOR MEAN DAY CALC
C         IF (IMEAN.EQ.1) THEN
C            DO 1080 I=1, 231
C               COMFTT (I, 1)=WTFCT*OUTCOM (I, 1, 1)+
C     1            WEIGHT*(OUTCOM (I, 1, 2)+OUTCOM (I, 1, 3))
C 1080           CONTINUE
C         END IF
C
C         WRITE(60, 5100)
C         DO 1120 J=1, 21
C            WRITE(60, 5120) XHUM1 (J), XHUM1 (J+1),
C     1         (COMFTT (I, 22-J), I=1, 11)
C 1120        CONTINUE
C      END IF
C
5100  FORMAT ('1', T28, 'TIME SPENT IN EACH COMFORT ZONE (HRS)', /,
     1   ' SP.HUM.', T35, 'DRYBULB TEMPERATURE', /,
     2   T13, '65/67  67/69  69/71  71/73  73/75  75/77  77/79  79/81',
     3   '  81/83  83/85 85/125', /)
5120  FORMAT (1X, F4.3, '/', F4.3, 11F7.2, /)
C
      END
