      SUBROUTINE STRMON (C, HDUM, IFWL, IPASS, IPASY, IWR, IWRB,
     1   NDAYTOT, ODDBM, ODHUM, RDUM, TDUM, TEMPDV, WSC, WTFCT,IDBG)
C
C-----PERFORMS CALCULATIONS FOR THE START OF THE MONTH
C-----CONSTANTS
CMDK NOUTAV
CMDK NOUTDY
CMDK NZN
C
C-----COMMON BLOCKS
CMDK INDIC1
CMDK HUMIDC
CMDK QUAYCH
CMDK QUAYLE
CMDK TEMP1
CMDK TIMEB
CMDK TSTATC
C
      INTEGER IPASS (NOUTDY), IPASY (NOUTDY), NDAYTOT(12)
      INTEGER IOUTAV (NOUTAV)
      REAL    C (5) ,ODDBM (25), ODHUM (25)
C
C-----INITIALIZATIONS
      DATA IOUTAV /1, 2, 3, 4, 5, 16, 18, 21, 23, 24, 39/
C
C-----READ NOMINAL WEATHER DATA
C
C          WETHR BLOCK 2A
      IF (NSEQW.EQ.1 .AND. IFWL.EQ.0) THEN
         DO 182 IHR=1, 24
C  AVGES (1, IHR) - DRY-BULB TEMP,F
C  AVGES (2, IHR) - WET-BULB TEMP,F
C  AVGES (4, IHR) - WIND SPEED, MILES/HR      
            READ(40, *, END=183) AVGES (1, IHR), AVGES (2, IHR),
     1         AVGES (4, IHR), RDUM
182         CONTINUE
         GO TO 186
183      WRITE(60, 7020) IHR
         STOP
C
      ELSE IF (NSEQW.EQ.0) THEN
         IF (IFWL.LE.0) THEN
            IWR=IWRB+KM
C  AVGES (1, 1-24) - DRY-BULB OUTDOOR TEMP, F
C  AVGES (2, 1-24) - WET-BULB OUTDOOR TEMP, F
C  AVGES (3, 1-24) - TOTAL SOLAR RADIATION ON A HORIZONTAL SURFACE,
C                    BTU/HR-FT2            
C  AVGES (4, 1-24) - WIND SPEED, MILES/HR
            READ(20, REC=IWR) RDUM, RDUM, AVGES, RDUM, REST
         END IF
      END IF
C
186   IF (NSEQW.EQ.0 .OR. NSEQW.EQ.1) THEN
C--------(1, IHR) BELOW IS DRY BULB TEMPERATURE, F
C--------(2, IHR) IS WET BULB TEMPERATURE, F
C--------(4, IHR) IS WIND SPEED, MPH
         IF (IFW (1).GT.0) READ(5, *) (AVGES (1, IHR), IHR=1, 24)
         IF (IFW (2).GT.0) READ(5, *) (AVGES (2, IHR), IHR=1, 24)
         IF (IFW (4).GT.0) READ(5, *) (AVGES (4, IHR), IHR=1, 24)
         DO 190 IHR=1, 24
            ODDBM (IHR)=AVGES (1, IHR)
            WSPEED (IHR)=AVGES (4, IHR)
C-----------SKIP SPECIFIC HUMIDITY CALCULATION IF DATA IS READ FROM
C-----------TAPE 20 WEATHER FILE
            IF (IMEAN.LT.0) THEN
              IF(IMODE.EQ.1.OR.(IMODE.EQ.2.AND.CFMBP.GT.0.))THEN
               IPSY=-1
               CALL PSY (IPSY, AVGES (1, IHR), AVGES (2, IHR), TDUM,
     +            RDUM, WSC, HDUM)
              ELSE
               WSC=.0003
              ENDIF
               ODHUM (IHR)=WSC
               ODWB=AVGES (2, IHR)
            END IF
190         CONTINUE
C--------SET 24:00 = 00:00 FOR INTERPOLATION
         ODDBM (25)=ODDBM (1)
         ODHUM (25)=ODHUM (1)
         WSPEED (25)=WSPEED (1)
C
      END IF
C-----IPASS=0 (AVERAGE OUTDY); IPASS=1 (INTEGRATE OUTDY)
      DO 193 I=1, NOUTAV
         IPASS (IOUTAV (I))=0.0
193      CONTINUE
      NDAY1=NDAYTOT (KM)-1
      DO 195 I=1, NOUTDY
         IPASY (I)=IPASS (I)*NDAY1+1
195      CONTINUE
C-----
C   SET IMODE FOR MONTHS WITH SPECIFIED HTG OR CLG IN TSTAT
C      IMODE = 1  COOLING MODE
C              2  HEATING MODE
C-----
C
C !!!! NOTE: TI BELOW IS FOR SINGLE ZONE ONLY
C
      IF (MODE.EQ.4) CALL TSTATD (2, IAC, IAC1, IBURN, IEFAN,IDBG)
      IF (IMEAN.GE.0) THEN
         TEMPDV=REST (1)
         WTFCT=REST (2)
      END IF
C-----FOLLOWING 4 LINES DEACTIVATED 11/5/85 KEH
C-----IAIRC2=1
C-----ASSIGN 665 TO IAIRC
C-----IF (IMODE.EQ.2) ASSIGN 675 TO IAIRC
C-----IF (IMODE.EQ.2) IAIRC2=2
      DO 200 I=1, 5
         J=I+3
         C (I)=REST (J)
200      CONTINUE
      RETURN
C
7020  FORMAT ('0', 5X, ' --ERROR: EOF ON WEATHER TAPE 40 AT STMT 182',
     1   /,
     2   9X, 'HOUR (I)= ', I5)
C
      END
