Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64) | :: | HISK(4) | ||||
real(kind=r64) | :: | HISU |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE DayltgExtHorizIllum(HISK,HISU)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Winkelmann
! DATE WRITTEN July 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates exterior daylight illuminance.
! METHODOLOGY EMPLOYED:
! Called by CalcDayltgCoefficients. Calculates illuminance
! on unobstructed horizontal surface by integrating
! over the luminance distribution of standard CIE skies.
! Calculates horizontal beam illuminance.
!
! REFERENCES:
! Based on DOE-2.1E subroutine DHILL.
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64) :: HISK(4) ! Horizontal illuminance from sky for different sky types
! and overcast sky (lux)
REAL(r64) :: HISU ! Horizontal illuminance from sun for unit beam normal
! illuminance (lux)
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: NTH = 18 ! Number of azimuth steps for sky integration
INTEGER, PARAMETER :: NPH = 8 ! Number of altitude steps for sky integration
REAL(r64), PARAMETER :: DTH = (2.0d0*PI) / REAL(NTH,r64) ! Sky integration azimuth stepsize (radians)
REAL(r64), PARAMETER :: DPH = PIOVR2 / REAL(NPH,r64) ! Sky integration altitude stepsize (radians)
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: IPH ! Altitude index for sky integration
INTEGER :: ITH ! Azimuth index for sky integration
REAL(r64),SAVE,DIMENSION(NPH) :: PH ! Altitude of sky element (radians)
REAL(r64),SAVE,DIMENSION(NTH) :: TH ! Azimuth of sky element (radians)
INTEGER :: ISky ! Sky type index
REAL(r64),SAVE,DIMENSION(NPH) :: SPHCPH ! Sine times cosine of altitude of sky element
LOGICAL, SAVE :: FirstTime=.true. ! flag for first time thru to initialize
! FLOW:
! Integrate to obtain illuminance from sky.
! The contribution in lumens/m2 from a patch of sky at altitude PH and azimuth TH
! is L(TH,PH)*SIN(PH)*COS(PH)*DTH*DPH, where L(TH,PH) is the luminance
! of the patch in cd/m2.
! Init
IF (FirstTime) THEN
DO IPH = 1,NPH
PH(IPH) = (IPH - 0.5d0) * DPH
SPHCPH(IPH) = SIN(PH(IPH)) * COS(PH(IPH)) ! DA = COS(PH)*DTH*DPH
END DO
DO ITH = 1,NTH
TH(ITH) = (ITH - 0.5d0) * DTH
END DO
FirstTime=.false.
ENDIF
HISK = 0.0d0
! Sky integration
DO IPH = 1,NPH
DO ITH = 1,NTH
DO ISky = 1,4
HISK(ISky) = HISK(ISky) + DayltgSkyLuminance(ISky,TH(ITH),PH(IPH)) * SPHCPH(IPH)
END DO
END DO
END DO
DO ISky = 1,4
HISK(ISky) = HISK(ISky) * DTH * DPH
END DO
! Direct solar horizontal illum (for unit direct normal illuminance)
HISU = SPHSUN * 1.0d0
RETURN
END SUBROUTINE DayltgExtHorizIllum