       SUBROUTINE ENDLP2(ATOUT, CDAY, DTIM1, HUMON, ICYC1,
     + ICYC6,ICYCCP, IDAYM, ILINES, IPASS, IPASY, IRH, ISWING, KDAYM,
     +NROUT, QHUMT, QSPT, QWAS, TIMAX, TIMAXN, TIMIN, TONMAX,
     +WATER, WEIGHT, WTFCT)
C  COMFTT WAS REMOVED FROM FORMAL PAR LIST ABOVE TO SAVE MEMORY     
C
C-----PERFORMS CALCULATIONS FOR THE END OF THE OUTER TIME LOOP
C       SET UP FOR A MAX OF 7 COMPRESSED WEATHER DAYS PER MONTH!
C
C-----CONSTANTS
CMDK NLVGRM
CMDK BTUKWH
CMDK NHBK
CMDK NHRO
CMDK NHRP
CMDK NOUTDY
CMDK NWL
CMDK NZN
CMDK NZW
C-----COMMON BLOCKS
CMDK BLKQSM
CMDK DUCTS5
CMDK ENCBK1
CMDK INDIC1
CMDK HANDBK
CMDK HUMIDC
CMDK IZZQ
CMDK OUTPUT      
CMDK QUAYCH
CMDK QUAYLE
CMDK SIMA
CMDK TIMEB
CMDK BLKTM2
CMDK TSTATC
      REAL    ATOUT (12, 24),ISWNG(NZN),SWGSUM(NZN),SWGAV(NZN)
      CHARACTER*8 CDAY (7)
C      REAL    COMFTT (11, 21)
      INTEGER   IPASS (NOUTDY), IPASY(NOUTDY), NROUT(24)
      REAL    RPEAK (2), TOTLS(3)
C      REAL TICY(5)
C      INTEGER IBRNQ(5)
C      DATA IBRNQ/5*0/
C      DATA TICY/5*0./
C
C-----FIND AVERAGE TEMPERATURE SWINGS
      IF (NSEQW.EQ.0) THEN
         ILINES=3
         IF (IDEBUG.GT.0) ILINES=1
      END IF
      DO 841 I=1,NROOMS
      ISWNG(I)=0
  841 SWGSUM(I)=0.0
      SWGAVG=0.0
      SWGMAX=0.
C  DONT READ PEAKS IF RUN IS STOPPED AT LESS THAN O.5 HR
      IF (ISWING.GT.1.AND.TIME.GT.0.5) THEN
C      
C NOTE: TAPE 11 IS USED TO MINIMIZE MEMORY DURING EXECUTION      
        ENDFILE 11
        REWIND 11
C         RPEAKS BELOW NOT USED (THEY ARE MAX AND MIN TEMP)
  842   READ(11,*,END=844)NRM,RPEAK(1),RPEAK(2),SWING
        ISWNG(NRM)=ISWNG(NRM)+1
        SWGSUM(NRM)=SWGSUM(NRM)+SWING
        IF(NRM.EQ.NLVGRM)THEN
          IF(SWING.GT.SWGMAX)SWGMAX=SWING
          ENDIF
        GO TO 842
  844   DO 846 I=1,NROOMS
        IF(ISWNG(I).EQ.0)THEN
          SWGAV(I)=0.
        ELSE
          SWGAV(I)=SWGSUM(I)/ISWNG(I)
          ENDIF
        WRITE(60,*)' *** AVG AIR TEMP SWING IN ZONE ',I,' = ',SWGAV(I),
     +            ' F'
  846   CONTINUE
        SWGAVG=SWGAV(NLVGRM)
        CLOSE(11)
        OPEN(11,FILE='TAPE11',STATUS='UNKNOWN')
      END IF
C-----FIND AVERAGE RELATIVE HUMIDITY SWINGS
      RHSUM=0.
      RHAVG=0.
      IF (IRH.GT.1.AND.TIME.GT.0.5) THEN
         ENDFILE 1
         REWIND 1
         LEND=IRH-1
         L=1
         LL=1
C         
C   TAPE1 CONTAINS RELATIVE-HUMIDITY PEAKS.  IT IS USED
C   TO SAVE MEMORY DURING EXECUTION
         READ(1,500,END=872)RPEAK(1)
         READ(1,500,END=872)RPEAK(2)
         IF (RPEAK (1).LE.RPEAK (2)) THEN
            XRP=RPEAK(2)
            RPEAK(2)=RPEAK(1)
            RPEAK(1)=XRP
            L=2
            LL=-1
            LEND=IRH
         END IF
         IRH=0
         DO 870 LK=L, LEND, 2
C            LM=LK+LL
            IF(LK.GT.L)THEN
               IF(LL.EQ.-1)THEN
                  READ(1,500,END=991)RPEAK(2)
                  READ(1,500,END=991)RPEAK(1)
               ELSE
                  READ(1,500,END=991)RPEAK(1)
                  READ(1,500,END=991)RPEAK(2)
                  ENDIF
               ENDIF
            SWING=RPEAK (1)-RPEAK (2)
            IRH=IRH+1
            RHSUM=RHSUM+SWING
870      CONTINUE
872      CONTINUE
         IF(IRH.EQ.0)THEN
           RHAVG = 0.
         ELSE
           RHAVG=RHSUM/IRH
         ENDIF
         CLOSE(1)
         OPEN(1,FILE='TAPE1',STATUS='UNKNOWN')
      END IF
C-----AIR CONDITIONER CYCLES
      ICYCCP=ICYCCP/2
C-----BURNER CYCLES
C      ICYCT=ICYC1
      ICYC1=ICYC1/2
      ICYC6=ICYC6/2
C-----CONVERT SUMMED HANDBOOK FACTORS TO TIME INTEGRATED ENERGY (BTU)
      IF (HBKRNL.GE.0.0) THEN
         DO 880 I=1, NHBK
            HBK (I)=HBK (I)*DTIME
880         CONTINUE
      END IF
C-----CALCULATE HOURLY VALUES TO BE PRINTED
      DO 890 J=1, INT (HRDY)
C--------PAGE 1
         HRPRT (1, J)=HROUT (1, J)/NROUT (J)
         HRPRT (2, J)=HROUT (2, J)/NROUT (J)
         HRPRT (3, J)=HROUT (3, J)/NROUT (J)
         HRPRT (27, J)=HROUT (23, J)/NROUT (J)
         HRPRT (28, J)=HROUT (24, J)/NROUT (J)
         HRPRT (4, J)=HROUT (5, J)*DTIME
         HRPRT (5, J)=HROUT (6, J)*DTIME
         HRPRT (6, J)=HROUT (7, J)*DTIME
         HRPRT (7, J)=HROUT (8, J)*DTIME
         HRPRT (8, J)=HROUT (9, J)*DTIME
         HRPRT (9, J)=HRPRT (6, J)+(HRPRT (7, J)+HRPRT (8, J))*BTUKWH
         HRPRT (10, J)=HROUT (4, J)*DTIME
         HRPRT (11, J)=(HROUT (18, J)+HROUT (19, J)+HROUT (20, J))*DTIME
C--------PAGE 2
C * *  CHANGED FROM /NROUT(J) TO *DTIME ON 9/25/87 BY RDF BELOW 5 LINES
         HRPRT (13, J)=HROUT (10, J)*DTIME
         HRPRT (14, J)=HROUT (11, J)*DTIME
         HRPRT (15, J)=HROUT (12, J)*DTIME
         HRPRT (16, J)=HROUT (13, J)*DTIME
         HRPRT (17, J)=HROUT (14, J)*DTIME
         HRPRT (18, J)=HRPRT (13, J)+HRPRT (14, J)+HRPRT (15, J)+
     1      HRPRT (17, J)+HRPRT (16, J)
         HRPRT (19, J)=HROUT (15, J)/NROUT (J)
         HRPRT (20, J)=HRPRT (18, J)+HRPRT (19, J)
         HRPRT (21, J)=HROUT (17, J)*DTIME
         HRPRT (23, J)=HROUT (16, J)*DTIME
C
         HRPRT (22, J)=HRPRT (23, J)-HRPRT (21, J)
         XLOAD=0.
         IF (MODE.EQ.2) XLOAD=HRPRT (22, J)
         HRPRT (12, J)=XLOAD+(HROUT (21, J)+HROUT (22, J))*DTIME
C
         HRPRT (24, J)=HROUT (21, J)*DTIME
         HRPRT (25, J)=HROUT (22, J)*DTIME
         HRPRT (26, J)=HRPRT (24, J)+HRPRT (25, J)
C        HRPRT (27, J) IS DEFINED ABOVE
C        HRPRT (28, J) IS DEFINED ABOVE
         HRPRT (29, J)=HROUT (25, J)*DTIME*IBAS
         HRPRT (30, J)=HROUT (26, J)/NROUT (J)
         HRPRT (31, J)=SOLARH(J)
         HRPRT (32, J)=HROUT (24, J)/NROUT (J)
         HRPRT (33, J)=HROUT (27, J)*DTIME
         IF (J.EQ.1) THEN
            HRPRT (34, J)=HROUT (28, J)
         ELSE
            HRPRT (34, J)=HROUT (28, J)-HROUT (28, J-1)
         END IF
         HRPRT (35, J)=HROUT (29, J)/NROUT (J)
         HRPRT (36, J)=HROUT (30, J)/NROUT (J)
         HRPRT (37, J)=HROUT (31, J)/NROUT (J)
         HRPRT (38, J)=HROUT (32, J)/NROUT (J)
         HPRT(1,J)=HROT(1,J)*DTIME
         HPRT(2,J)=HROT(2,J)*DTIME
         HPRT(3,J)=HROT(3,J)*DTIME
         ATOUT (1, J)=ATOUT (1, J)/NROUT (J)
         ATOUT (2, J)=ATOUT (2, J)/NROUT (J)
         ATOUT (3, J)=ATOUT (3, J)/NROUT (J)
         ATOUT (4, J)=ATOUT (4, J)/NROUT (J)
         ATOUT (5, J)=ATOUT (5, J)/NROUT (J)
         ATOUT (7, J)=ATOUT (7, J)/NROUT (J)
         ATOUT (8, J)=ATOUT (8, J)*DTIME
         ATOUT (9, J)=ATOUT (9, J)*DTIME
         ATOUT (10, J)=ATOUT (10, J)*DTIME
         ATOUT (11, J)=ATOUT (11, J)*DTIME
         ATOUT (12, J)=HROUT (32, J)/NROUT (J)
C
C--------CALCULATE MONTHLY TOTALS
         OUTDY (IDAYM, 1)=OUTDY (IDAYM, 1)+HRPRT (2, J)/HRDY
         OUTDY (IDAYM, 2)=OUTDY (IDAYM, 2)+HRPRT (3, J)/HRDY
         OUTDY (IDAYM, 3)=OUTDY (IDAYM, 3)+HRPRT (1, J)/HRDY
         OUTDY (IDAYM, 4)=OUTDY (IDAYM, 4)+SWGAVG/HRDY
         OUTDY (IDAYM, 5)=OUTDY (IDAYM, 5)+RHAVG/HRDY
C--------HEATING TOTALS
         OUTDY (IDAYM, 6)=OUTDY (IDAYM, 6)+HRPRT (4, J)
C        OUTDY (IDAYM, 7) IS EVALUATED BELOW (OUTSIDE OF DO LOOP)
         OUTDY (IDAYM, 8)=OUTDY (IDAYM, 8)+HRPRT (24, J)
         OUTDY (IDAYM, 9)=OUTDY (IDAYM, 9)+HRPRT (25, J)+HRPRT (29, J)
         OUTDY (IDAYM, 10)=OUTDY (IDAYM, 10)+HRPRT (24, J)+
     1      HRPRT (25, J)+HRPRT (29, J)
         OUTDY (IDAYM, 11)=OUTDY (IDAYM, 11)+HRPRT (8, J)
         OUTDY (IDAYM, 12)=OUTDY (IDAYM, 12)+HRPRT (7, J)
         OUTDY (IDAYM, 13)=OUTDY (IDAYM, 13)+HRPRT (6, J)
         OUTDY (IDAYM, 14)=OUTDY (IDAYM, 14)+HRPRT (6, J)+
     1      BTUKWH*(HRPRT (7, J)+HRPRT (8, J))
C        OUTDY (IDAYM, 15) IS EVALUATED BELOW (OUTSIDE OF DO LOOP)
C--------MISC TOTALS (ADDED 12/85 BY FEJ)
         OUTDY (IDAYM, 16)=OUTDY (IDAYM, 16)+HRPRT (30, J)/HRDY
         OUTDY (IDAYM, 17)=OUTDY (IDAYM, 17)+HRPRT (31, J)
         OUTDY (IDAYM, 18)=OUTDY (IDAYM, 18)+HRPRT (32, J)/HRDY
         OUTDY (IDAYM, 19)=OUTDY (IDAYM, 19)+HRPRT (33, J)
         OUTDY (IDAYM, 20)=OUTDY (IDAYM, 20)+HRPRT (5, J)
         OUTDY (IDAYM, 21)=OUTDY (IDAYM, 21)+HRPRT (35, J)/HRDY
         OUTDY (IDAYM, 22)=OUTDY (IDAYM, 22)+HRPRT (15, J)
         OUTDY (IDAYM, 23)=OUTDY (IDAYM, 23)+HRPRT (36, J)/HRDY
         OUTDY (IDAYM, 24)=OUTDY (IDAYM, 24)+HRPRT (37, J)/HRDY
C--------COOLING TOTALS
         OUTDY (IDAYM , 25)=OUTDY (IDAYM, 25)+HRPRT (10, J)
C        OUTDY (IDAYM, 26) IS EVALUATED BELOW (OUTSIDE OF DO LOOP)
         OUTDY (IDAYM, 27)=OUTDY (IDAYM, 27)-HRPRT (23, J)
         OUTDY (IDAYM, 28)=OUTDY (IDAYM, 28)+HROUT (18, J)*DTIME
         OUTDY (IDAYM, 29)=OUTDY (IDAYM, 29)+HROUT (19, J)*DTIME
         OUTDY (IDAYM, 30)=OUTDY (IDAYM, 30)+HROUT (20, J)*DTIME
         OUTDY (IDAYM, 31)=OUTDY (IDAYM, 31)+HRPRT (11, J)
C        OUTDY (IDAYM, 32 TO 38) EVALUATED BELOW (OUTSIDE OF DO LOOP)
         OUTDY (IDAYM, 39)=OUTDY (IDAYM, 39)+HRPRT (38, J)/HRDY
C        OUTDY (IDAYM, 40 TO 44) EVALUATED BELOW (OUTSIDE OF DO LOOP)
890      CONTINUE
      OUTDY (IDAYM, 7)=ICYC1
      OUTDY (IDAYM , 15)=RATIO (OUTDY (IDAYM, 10), OUTDY (IDAYM, 14),
     1   1.0)
      OUTDY (IDAYM, 26)=ICYCCP
      OUTDY (IDAYM, 32)=RATIO (OUTDY (IDAYM, 27), OUTDY (IDAYM, 31),
     1   0.001)
      WRITE(60, 4000) CDAY (IDAYM), CMONTH (KM), ICITY, JULDAY
      WRITE(60, 4010) REDC, REDH
      WRITE(60, 4020) IDES
C-----HUMIDIFIER OUTPUT
      OUTDY (IDAYM, 33)=HUMON*DTIME
      OUTDY (IDAYM, 34)=ICYC6
      OUTDY (IDAYM, 35)=QSPT * DTIME
      OUTDY (IDAYM, 36)=QWAS*DTIME
      OUTDY (IDAYM, 37)=QHUMT*DTIME
      OUTDY (IDAYM, 38)=WATER*DTIME
C-----COLLECT DAILY MAX/MIN'S
      OUTDY (IDAYM, 40)=TONMAX
      OUTDY (IDAYM, 41)=SWGMAX
      OUTDY (IDAYM, 42)=TIMAX
      OUTDY (IDAYM, 43)=TIMAXN
      OUTDY (IDAYM, 44)=TIMIN
      DO 900 J=1, INT (HRDY)
         J1=J-1
         WRITE(60, 4030) J1 , J, (HRPRT (I, J), I=1, 3),
     1      HRPRT (27, J), HRPRT (28, J), (HRPRT (K, J), K=4, 12)
900      CONTINUE
      IF (IQPRT.GT.0) THEN
         DO 911 I=1 , 14
            K=I+12
            TOTALS (I)=0.
C  TOTALS USED FOR STRUCTURE ENERGY BALANCE            
C  NOTE: TOTALS(12) IS USED IN THE DUCT ENERGY BALANCE
            DO 910 J=1, INT (HRDY)
               TOTALS (I)=TOTALS (I)+HRPRT (K, J)
910            CONTINUE
911         CONTINUE

C    DUCT ENERGY BALANCE
         DO 913 I=1,3
           TOTLS(I)=0.
           DO 912 J=1,INT(HRDY)
           TOTLS(I)=TOTLS(I)+HPRT(I,J)
  912      CONTINUE
  913    CONTINUE
         WRITE(60, 4040) CDAY (IDAYM) , CMONTH (KM), ICITY,
     1      JULDAY
         WRITE(60, 4010) REDC, REDH
         WRITE(60, 4050) IDES
         DO 915 J=1 , INT (HRDY)
            J1=J-1
            WRITE(60, 4060) J1 , J, (HRPRT (I, J), I=13, 26)
915         CONTINUE
         WRITE(60, 4070) (TOTALS (I) , I=1, 13, 2),
     1      (TOTALS (J), J=2, 14, 2)
         
C   DUCT ENERGY BALANCE
         IF (TOTALS(12).EQ.0.)THEN
           DCTBAL = 9999.
         ELSE
           DCTBAL=100.*(TOTLS(1)+TOTLS(2)+TOTLS(3)-TOTALS(12))/
     +     TOTALS(12)
         ENDIF
         WRITE(60,4081)DCTBAL,TOTLS,TOTALS(12)
         IF (IAPRT.EQ.1) THEN
C           PRINT ATTIC SUMMARY
            WRITE(60, 4000) CDAY (IDAYM), CMONTH (KM), ICITY,
     1         JULDAY
            WRITE(60, 4010) REDC, REDH
            WRITE(60, 7050) IDES
            DO 945 J=1 , INT (HRDY)
               J1=J-1
               WRITE(60, 7060) J1 , J, ATOUT (12, J),
     1            (ATOUT (I, J), I=1, 5), (ATOUT (I, J), I=7, 11),
     2            HRPRT (14, J), ATOUT (11, J)+HRPRT (14, J)
945            CONTINUE
           DO 946 I=15, 20
              TOTALS (I)=0.
946           CONTINUE
           DO 947 J=1, INT (HRDY)
              TOTALS (15)=TOTALS (15)+ATOUT (8, J)
              TOTALS (16)=TOTALS (16)+ATOUT (9, J)
              TOTALS (17)=TOTALS (17)+ATOUT (10, J)
              TOTALS (18)=TOTALS (18)+ATOUT (11, J)
              TOTALS (19)=TOTALS (19)+HRPRT (14, J)
              TOTALS (20)=TOTALS (20)+HRPRT (14, J)+ATOUT (11, J)
947           CONTINUE
            WRITE(60, 7070) (TOTALS (I), I=15, 20)
         END IF
      END IF
C-----CHECK IF WANT MEAN SUMMARY ONLY
      IF (IMEAN.EQ.1 .AND. IDAYM.EQ.3) THEN
         WEIGHT=(1.-WTFCT)/2.
         DO 954 J=1, 39
            OUTDY (8, J)=(WTFCT*OUTDY (1, J)+WEIGHT*(OUTDY (2, J)+
     1         OUTDY (3, J)))*IPASY (J)
 954        CONTINUE
         OUTDY (8, 15)=RATIO (OUTDY (8, 10), OUTDY (8, 14), 1.0)
         OUTDY (8, 32)=RATIO (OUTDY (8, 27), OUTDY (8, 31), 0.001)
C--------PRINT SUMMARIES MEAN, MAX, MIN, AND WTD AVG
         WRITE(60, 5000) CDAY (IDAYM), CMONTH (KM), ICITY,
     1      JULDAY, REDC, REDH, IDES
         WRITE(60,*) ' AVERAGE CYCLIC ROOM TEMP BELOW IS FOR ZONE '
     +              ,NLVGRM
         WRITE(60,*) '  (NLVGRM IS SET AS A PARAMETER IN ENDLP1,2.FOR)'
         WRITE(60, 5010) WTFCT, WEIGHT, WEIGHT,
     1      ((OUTDY (I, J), I=1, 4), J=1, 5)
         IF (MODE.NE.2) THEN
            WRITE(60, 5020) ((OUTDY (I, J), J=6, 7), I=1, 4),
     1         ((OUTDY (I, J), I=1, 4), J=8, 15)
         END IF
         IF (MODE.NE.3) THEN
            WRITE(60, 5030) ((OUTDY (I, J), J=25, 26), I=1, 4),
     1         ((OUTDY (I, J), I=1, 4), J=27, 32)
         END IF
         IF (CFMBP.GT.0.0) WRITE(60, 5090) ((OUTDY (I, J), I=1, 4),
     1      J=33, 38)
      ELSE
C--------PRINT SUMMARIES, DAILY AND CUMULATIVE
         WRITE(60, 5040) CDAY (IDAYM), KDAYM, CMONTH (KM),
     1      ICITY, JULDAY, REDC, REDH, IDES
         IF (HBKRNL.LT.0 .OR. IDAYM.GT.1) THEN
            DO  956 J=1, 39
               IF (IPASS (J).EQ.0) THEN
C                 MAINTAIN RUNNING (CUMULATIVE) AVERAGE
                  IF (HBKRNL.LT.0.0) THEN
                        OUTDY (8, J)=(OUTDY (8, J)*(IDAYM-1)+
     1                  OUTDY (IDAYM, J))/IDAYM
                  ELSE
                     OUTDY (8, J)=(OUTDY (8, J)*(IDAYM-2)+
     1                  OUTDY (IDAYM, J))/(IDAYM-1)
                  END IF
               ELSE
C                 MAINTAIN RUNNING (CUMULATIVE) SUM
                  OUTDY (8, J)=(OUTDY (8, J)+OUTDY (IDAYM, J))
               END IF
 956           CONTINUE
            OUTDY (8, 15)=RATIO (OUTDY (8, 10), OUTDY (8, 14), 1.0)
            OUTDY (8, 32)=RATIO (OUTDY (8, 27), OUTDY (8, 31), 0.001)
            DO  960 J=40, 43
               IF (OUTDY (IDAYM, J).GT.OUTDY (8, J)) OUTDY (8, J)=
     1            OUTDY (IDAYM, J)
 960           CONTINUE
            IF (OUTDY (IDAYM, 44).LT.OUTDY (8, 44)) OUTDY (8, 44)=
     1         OUTDY (IDAYM, 44)
         END IF
C--------MONTHLY TOTAL FOR TOTPOW AND SPF
         WRITE(60, 5050) (OUTDY (IDAYM, J), OUTDY (8, J), J=1, 5)
         IF (MODE.NE.2) THEN
            WRITE(60, 5060) OUTDY (IDAYM, 6), OUTDY (IDAYM, 7),
     1         OUTDY (8, 6), OUTDY (8, 7),
     2         (OUTDY (IDAYM, J), OUTDY (8, J), J=8, 15)
         END IF
         IF (MODE.NE.3) THEN
            WRITE(60, 5070) OUTDY (IDAYM, 25), OUTDY (IDAYM, 26),
     1         OUTDY (8, 25), OUTDY (8, 26),
     2         (OUTDY (IDAYM, J), OUTDY (8, J), J=27, 32)
         END IF
         IF (CFMBP.GT.0.0) WRITE(60, 5090)
     1      ((OUTDY (I, J), I=1, 8, 7), J=33, 38)
      END IF
      CALL QACCUMD (IDAYM)
C      IF (IMEAN.EQ.1 .AND. ICOMF.EQ.0) THEN
C         DO 970 I=1, 231
C            OUTCOM (I, 1, IDAYM)=COMFTT (I, 1)
C 970         CONTINUE
C      END IF
C
      DTIME = DTIM1
      RETURN
  991 STOP 'ENDLP2:EOF ON RPEAK READ ON TAPE1'
  500 FORMAT(1X,G13.5)
  504 FORMAT(14X,6I5)
4000  FORMAT ('1**** HOURLY TEMPERATURE / ENERGY SUMMARY FOR THE ', A8,
     +   ' SIMULATION DAY OF ', A5, ' IN ', A4, '.   JULIAN DAY=', I4)
4010  FORMAT (' BASE UNIT COOLING CAPACITY MULTIPLIED BY ', F10.3, /,
     +       ' BASE UNIT HEATING CAPACITY MULTIPLIED BY ', F10.3)
4020  FORMAT (1X, 15A4, //,
     +   ' TIME OF DAY      TO     TI    RHI   TRET   TBAS   BURNER BL',
     +   'OWER      FUEL   BLOWER BURNER     TOTAL  AIR CONDITIONER   ',
     +   '  TOTAL', /,
     +   T56, 'ON     ON     INPUT   ENERGY', 10X, 'FURNACE', 8X,
     +   'ON ENERGY    OUTPUT', /, T85, 'ENERGY    ENERGY     TIME', /,
     +   T56, 'HR     HR       BTU    KW-HR  KW-HR       BTU        HR',
     +   '  KW-HR       BTU', /)
4030  FORMAT (I3, ':00-', I2, ':00 ', 5F7.1, 2X, 2F7.2, 2X, F8.0, 2X,
     +   2F7.2, 2X, F8.0, 3X, 2F7.2, 3X, F8.0, /)
4040  FORMAT ('1*****HOURLY LOAD SUMMARY FOR THE ', A8,
     +   ' SIMULATION DAY OF ', A5, ' IN ', A4, '.  JULIAN DAY=', I4)
4050  FORMAT (1X, 15A4, /,
     +   T77, 'AIR CONDITIONER OUTPUT     AIR-SIDE EQUIP OUTPUT', /,
     +   ' TIME OF DAY  WALLS CLG-ATTC INFL  WINDOWS MISC  SENSIBLE  L',
     +   'ATENT   TOTAL  SENSIBLE  LATENT   TOTAL        NET    MISC  ',
     +   'TOTAL', /,
     +   T17, 'BTU    BTU    BTU    BTU    BTU       BTU     BTU     B',
     +   'TU       BTU     BTU     BTU                       BTU', /,
     +   T107, 'BTU     BTU', /)
4060  FORMAT (I3, ':00-', I2, ':00', 4F7.0, F8.0,1X, 3F8.0, 2X, 3F8.0,
     +        1X,3F9.0, /)
4070  FORMAT ('0TOTALS', F12.0, 2F14.0, 2F18.0, F16.0, F18.0, /,
     +   12X, 2F14.0, F17.0, F16.0, 2F18.0, F16.0)
4081  FORMAT(1X,'DUCT ENERGY BALANCE= ',G13.5,' PCT'/
     +10X,'TOTLS(1)--DUCT HEAT LOSS TO OTHER NON-CONDITIONED SPACES= ',
     +G13.5/10X,'TOTLS(2)--NET HEAT DELIVERED TO CONDITIONED ZONES= ',
     +G13.5/10X,'TOTLS(3)--HEAT LOSS FROM DUCTS TO CONDITIONED ZONES= ',
     +G13.5/10X,'TOTALS(12)-HEAT DELIVERED TO DUCTS FROM FURNACE= ',
     +G13.5)
4090  FORMAT(1H1)
C *** MONTHLY SUMMARY OUTPUT
5000  FORMAT ('1MEAN/MAX/MIN SUMMARY FOR ', A5, ' SIMULATION DAY OF ',
     +   A5, ' IN ', A4, 5X, '****  JULIAN DAY=', I3, /,
     +   5X, 'BASE UNIT COOLING CAPACITY MULTIPLIED BY ', F10.3, /,
     +   5X, 'BASE UNIT HEATING CAPACITY MULTIPLIED BY ', F10.3, /,
     +   5X, 15A4, /,
     +   '0', T58, 'MEAN', T76, 'HIGH', T95, 'LOW', T109, 'MONTHLY', /,
     +   T59, 'DAY', T73, 'EXTREME', T91, 'EXTREME', T108, 'WEIGHTED',
     +   /,
     +   T109, 'AVERAGE', //)
5010  FORMAT (' WEIGHTING FACTORS', T52, 3 (F10.3,8X), /,
     +   '0MEAN ROOM TEMPERATURE', T48, 'DEGF', 4 (F10.1, 8X), /,
     +   ' MEAN ROOM RELATIVE HUMIDITY', T51, '%', 4 (F10.1, 8X), /,
     +   ' MEAN OUTDOOR DRY BULB', T48, 'DEGF', 4 (F10.1, 8X), /,
     +   '0AVERAGE CYCLIC ROOM TEMPERATURE SWING', T48, 'DEGF',
     +   4 (F10.1, 8X), /,
     +   ' AVERAGE CYCLIC ROOM REL HUM SWING', T51, '%', 4 (F10.1, 8X),
     +   /)
5020  FORMAT (//' *** HEATING ***', /,
     +   /' TOTAL BURNER ON TIME (CYCLES)', T50, 'HR', 4 (F10.2, '(',
     +   F6.0, ')'), /,
     +   /' NET HEATING OUTPUT', T49, 'BTU', 4 (F12.0, 6X), /,
     +   ' MIS HEATING OUTPUT', T49, 'BTU', 4 (F12.0, 6X), /,
     +   ' TOTAL HEATING OUTPUT', T49, 'BTU', 4 (F12.0, 6X), /,
     +   /' TOTAL BURNER FAN ENERGY', T47, 'KW-HR', 4 (F10.2, 8X), /,
     +   ' TOTAL BLOWER ENERGY', T47, 'KW-HR', 4 (F10.2, 8X), /,
     +   ' TOTAL FUEL INPUT ENERGY', T49, 'BTU', 4 (F12.0, 6X), /,
     +   ' TOTAL ENERGY (HEATING)', T49, 'BTU', 4 (F12.0, 6X), /,
     +   /' HEATING PERFORMANCE FACTOR', 23X, 4 (F12.3, 6X), ///)
5030  FORMAT (//' *** COOLING ***', /,
     +   /' TOTAL COMPRESSOR ON TIME(CYCLES)', T50, 'HR', 4 (F10.2, '(',
     +   F6.0, ')'), /,
     +   /'TOTAL COOLING BY AIR CONDITIONING', T49, 'BTU', 4 (F10.0,
     +   8X), /,
     +   ' TOTAL COMPRESSOR ENERGY', T47, 'KW-HR', 4 (F10.2, 8X), /,
     +   ' TOTAL INDOOR FAN ENERGY', T47, 'KW-HR', 4 (F10.2, 8X), /,
     +   ' TOTAL OUTDOOR FAN ENERGY', T47, 'KW-HR', 4 (F10.2, 8X), /,
     +   ' TOTAL ENERGY (COOLING)', T47, 'KW-HR', 4 (F10.2, 8X), /,
     +   /' COOLING SEASONAL PERFORMANCE FACTOR    BTU/WATT-HR',
     +   4 (F10.2, 8X), /)
5040  FORMAT (///' ***DAILY AND CUMULATIVE SUMMARY FOR THE ', A8,
     +   ' SIMULATION DAY (DAY=', I3, ') OF ', A5, ' IN ', A4, 5X,
     +   '****  JULIAN DAY=', I3, /,
     +   5X, 'BASE UNIT COOLING CAPACITY MULTIPLIED BY ', F10.3, /,
     +   5X, 'BASE UNIT HEATING CAPACITY MULTIPLIED BY ', F10.3, /,
     +   5X, 15A4, /,//
     +   1X, T73, 'MONTHLY', /,
     +   T55, 'CURRENT', T70, 'CUMULATIVE', /,
     +   T59, 'DAY', T70, 'OR AVERAGE', //)
5050  FORMAT (' MEAN ROOM TEMPERATURE', T48, 'DEGF', 2 (F10.1, 8X), /,
     +   ' MEAN ROOM RELATIVE HUMIDITY', T51, '%', 2 (F10.1, 8X), /,
     +   ' MEAN OUTDOOR DRY BULB', T48, 'DEGF', 2 (F10.1, 8X), /,
     +   '0AVERAGE CYCLIC ROOM TEMPERATURE SWING', T48, 'DEGF',
     +   2 (F10.1, 8X), /,
     +   ' AVERAGE CYCLIC ROOM REL HUM SWING', T51, '%',
     +   2 (F10.1, 8X), /)
5060  FORMAT (//' *** HEATING ***', /,
     +   '0TOTAL BURNER ON TIME (CYCLES)', T50, 'HR', 2 (F10.2, '(',
     +   F6.0, ')'), /,
     +   /' NET HEATING OUTPUT', T49, 'BTU', 2 (F12.0, 6X), /,
     +   ' MIS HEATING OUTPUT', T49, 'BTU', 2 (F12.0, 6X), /,
     +   ' TOTAL HEATING OUTPUT', T49, 'BTU', 2 (F12.0, 6X), /,
     +   /' TOTAL BURNER FAN ENERGY', T47, 'KW-HR', 2 (F10.2, 8X), /,
     +   ' TOTAL BLOWER ENERGY', T47, 'KW-HR', 2 (F10.2, 8X), /,
     +   ' TOTAL FUEL INPUT ENERGY', T49, 'BTU', 2 (F12.0, 6X), /,
     +   ' TOTAL ENERGY (HEATING)', T49, 'BTU', 2 (F12.0, 6X), /,
     +   /' HEATING PERFORMANCE FACTOR', 23X, 2 (F12.3, 6X), ///)
5070  FORMAT (//' *** COOLING ***', /,
     +   /' TOTAL COMPRESSOR ON TIME(CYCLES)', T50, 'HR',
     +   2 (F10.2, '(', F6.0, ')'), /,
     +   /' TOTAL COOLING BY AIR CONDITIONING', T49, 'BTU',
     +   2 (F10.0, 8X), /,
     +   /' TOTAL COMPRESSOR ENERGY', T47, 'KW-HR', 2 (F10.2, 8X), /,
     +   ' TOTAL INDOOR FAN ENERGY', T47, 'KW-HR', 2 (F10.2, 8X), /,
     +   ' TOTAL OUTDOOR FAN ENERGY', T47, 'KW-HR', 2 (F10.2, 8X), /,
     +   ' TOTAL ENERGY (COOLING)', T47, 'KW-HR', 2 (F10.2, 8X), /,
     +   /' COOLING SEASONAL PERFORMANCE FACTOR    BTU/WATT-HR',
     +   2 (F10.2, 8X), /)
5090  FORMAT (//' *** HUMIDIFIER ***', /,
     +   /' TOTAL HUMIDIFIER ON TIME', T50, 'HR', 2 (F10.2, 8X), /,
     +   ' TOTAL HUMIDIFIER CYCLES', T52, 2 (F10.0, 8X), /,
     +   ' TOTAL ENTHALPY OF SUPPLY WATER ', T49, 'BTU', 2 (F10.1, 8X),
     +   /,
     +   ' TOTAL ENTHALPY OF WASTE WATER ', T49, 'BTU', 2 (F10.1, 8X),
     +   /,
     +   ' TOTAL HEAT REMOVED FROM THE AIR', T49, 'BTU', 2 (F10.1, 8X),
     +   /,
     +   ' TOTAL WATER ADDED TO THE AIR', T50, 'LB', 2 (F10.2, 8X))
7050  FORMAT (1X, 15A4, /,
     +   /' TIME OF DAY    TATTIC  SOLAIR  TW1(5)  TW4(5)  TW1(6)  TW4('
     +  ,'6)    TPA  QLOSRFA  QCONRF   QSKY    QCRAD   QWALL6   CEILTO',
     +   'T', /)
7060  FORMAT (I3, ':00-', I2, ':00 ', 7F8.1, 2X, 6F8.0, /)
7070  FORMAT('0TOTALS', 55X, 6F10.1)
C
      END
