      FUNCTION HC(NRM,IZW,IC,IFN,TWI,TIA) 
C                                                            MULTIPLIER 
C  SET CONVECTION COEF AT INTERIOR SURFACES                (SET IN STRCTL)
C    IC - 1  CEILING                                        (-- HIC)
C       - 2  FLOOR (BSMT SIDE OF LVG SPC FLOOR)             (-- H1F)
C       - 3  WALLS (OUTSIDE AND INTERIOR)                   (-- HIW)
C       - 4  BASEMENT WALLS                                 (-- H3B)
C       - 5  GARAGE                                         (-- HIG)
C       - 6  FLOOR (LVG SPC SIDE OF LVG SPC FLOOR)          (-- H3F)
C       - 7  FLOOR (BASEMENT)                               (-- H3FB) 
C   IFN - TRUE IF ZONE IS HEATED AND BLOWER IS ON 
C   TWI - WALL SURFACE TEMP,F 
C   TIA - AIR TEMP, F 
C  IHCOLD = 0  H=F(DT, SURF ORIENTATION,HT FLOW DIR ,BLWR OPERATION) 
C         = 1  H=F(SURF ORIENTATION, HT FLOW DIR(HORIZ SURF)) 
C         = 2  H'S USED AS INPUTTED (I.E. USE HIC,H1F,....)
C 
CMDK NZN
CMDK IZZQ
CMDK STRUCA
CMDK TIMEB
C 
      LOGICAL IFN 
C  HVW,HHU,HHD FROM TABLE 1. HOF 1981, P.23.12
C   H ON VERTICAL WALL(1.46-0.891)
      DATA HVW/0.569/ 
C   H ON HORIZ SURF WITH HEAT FLOW UP (1.63-0.891)
      DATA HHU/0.739/ 
C   H ON HORIZ SURF WITH HEAT FLOW DOWN (1.08-0.891)
      DATA HHD/0.189/ 
      DATA ICLD/0/
      IF(ICLD.EQ.0.AND.IHCOLD.LT.2)THEN
        ICLD=1
        WRITE(60,*)' ****************************************'
        WRITE(60,*)'   YOU HAVE CHOSEN IHCOLD=0 OR 1!'
        WRITE(60,*)'    * DID YOU SET HIC,H1F,HIW,H3B,HIG,H3F,H3FB'
        WRITE(60,*)'      TO 1.0 OR OTHER MULTIPLIER IN STRMZA1.DAT'
        WRITE(60,*)'      (WHICH IS READ IN STRCTL.FOR)?'
        IF(IHCOLD.EQ.0)THEN
          WRITE(60,*)'  YOU HAVE CHOSEN IHCOLD=0, SO YOU MAY SET'
          WRITE(60,*)'  HIBLWR= 1.08 (TARP VALUE) OR WHATEVER '
          WRITE(60,*)'  IN CNTRLXXX.DAT TO FIX H AT WALLS WITH '
          WRITE(60,*)'  BLOWER ON. IF YOU DONT SET HIBLWR, THE OPTION'
          WRITE(60,*)'  FOR CONST H AT WALLS WITH BLOWER OPERATION WILL'
          WRITE(60,*)'  BE DEACTIVATED(SEE HC.FOR)'
          ENDIF
        ENDIF
      IF(IHCOLD.EQ.1)THEN 
         IF(IC.LE.2)THEN
            HIP=HHD 
            IF(TIA.GT.TWI)HIP=HHU 
            IF(IC.EQ.1)HCU=HIP*HIC 
            IF(IC.EQ.2)HCU=HIP*H1F 
            GO TO 100 
            ENDIF 
         IF(IC.GT.2.AND.IC.LE.5)THEN
            IF(IC.EQ.3)HCU=HVW*HIW 
            IF(IC.EQ.4)HCU=HVW*H3B 
            IF(IC.EQ.5)HCU=HVW*HIG 
            GO TO 100 
            ENDIF 
         IF(IC.GT.5)THEN
            HIP=HHU 
            IF(TIA.GT.TWI)HIP=HHD 
            IF(IC.EQ.6)HCU=HIP*H3F 
            IF(IC.EQ.7)HCU=HIP*H3FB
            IF(IC.GT.7)STOP ' HC: IC MUST BE < 8! '
            GO TO 100 
            ENDIF
         ENDIF
      IF(IC.LE.2)THEN 
         IF(IC.EQ.1)HIP=HIC 
         IF(IC.EQ.2)HIP=H1F 
         IF(IHCOLD.EQ.2)GO TO 200 
C  CEILING - - - - -
         IF(IFN.AND.HIBLWR.GT.0.)THEN
            HCU=HIP*HIBLWR 
         ELSE 
            DTI=TIA-TWI 
            CH1=0.22
            IF(TWI.GT.TIA)CH1=0.09
            HCU=HIP*CH1*(ABS(DTI))**.33
            ENDIF 
         GO TO 100
         ENDIF
C  WALLS - - - - -
      IF(IC.GE.3.AND.IC.LE.5)THEN 
         IF(IC.EQ.3)HIP=HIW 
         IF(IC.EQ.4)HIP=H3B 
         IF(IC.EQ.5)HIP=HIG 
         IF(IHCOLD.EQ.2)GO TO 200 
         IF(IFN.AND.HIBLWR.GT.0.)THEN
            HCU=HIP*HIBLWR 
         ELSE 
            DTI=TIA-TWI 
            HCU=HIP*0.19*(ABS(DTI))**.33 
            ENDIF 
         GO TO 100
         ENDIF
C  FLOOR - - - - - -
      IF(IC.GE.6.AND.IC.LE.7)THEN 
         IF(IC.EQ.6)HIP=H3F 
         IF(IC.EQ.7)HIP=H3FB
         IF(IHCOLD.EQ.2)GO TO 200 
         IF(IFN.AND.HIBLWR.GT.0.)THEN
            HCU=HIP*HIBLWR 
         ELSE 
            DTI=TIA-TWI 
            CH1=0.09
            IF(TWI.GT.TIA)CH1=0.22
            HCU=HIP*CH1*(ABS(DTI))**.33
            ENDIF 
         GO TO 100
         ENDIF
       WRITE(*,*)' HC 1:  IC= ',IC
       STOP ' HC 1: IC MUST BE < 8!'
  100 CONTINUE
      DATA IPRQ/800/
      IF(IPRQ.LT.700)THEN
        IPRQ=IPRQ+1
        WRITE(60,522)TIME*60.,NRM,IZW,IC,IFN,HCU
  522 FORMAT(1X,' TIME,NRM,IZW,IC,IFN,HC= ',F8.3,1X,3(I5),2X,L2,2X,F8.3)        
      ENDIF
      HC=HCU
      RETURN
  200 HCU=HIP
      GO TO 100 
      END 
