Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | WhichZone |
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 CheckLightsReplaceableMinMaxForZone(WhichZone)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN April 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Daylighting is not available unless Lights (replaceable) is 0.0 or 1.0. No dimming will be done
! unless the lights replaceable fraction is 1.0. This is documented in the InputOutputReference but
! not warned about. Also, this will sum the Zone Design Lighting level, in case the calling routine
! would like to have an error if the lights is zero and daylighting is requested.
! METHODOLOGY EMPLOYED:
! Traverse the LIGHTS structure and get fraction replaceable - min/max as well as lighting
! level for a zone.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataDaylighting
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: WhichZone ! Zone Number
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: Loop
REAL(r64) :: LightsRepMin ! Minimum Lighting replacement fraction for any lights statement for this zone
REAL(r64) :: LightsRepMax ! Maximum Lighting replacement fraction for any lights statement for this zone
INTEGER :: NumLights ! Number of Lights statement for that zone.
IF (GetInternalHeatGainsInputFlag) THEN
CALL ShowFatalError('CheckLightsReplaceableMinMaxForZone: Function called prior to Getting Lights Input.')
ENDIF
LightsRepMin=99999.d0
LightsRepMax=-99999.d0
NumLights=0
DO Loop=1,TotLights
IF (Lights(Loop)%ZonePtr /= WhichZone) CYCLE
LightsRepMin=MIN(LightsRepMin,Lights(Loop)%FractionReplaceable)
LightsRepMax=MAX(LightsRepMax,Lights(Loop)%FractionReplaceable)
NumLights=NumLights+1
IF ((ZoneDaylight(Lights(Loop)%ZonePtr)%DaylightType == DetailedDaylighting &
.OR. ZoneDaylight(Lights(Loop)%ZonePtr)%DaylightType == DElightDaylighting) &
.AND. (Lights(Loop)%FractionReplaceable > 0.0d0 .AND. Lights(Loop)%FractionReplaceable < 1.0d0)) THEN
CALL ShowWarningError('CheckLightsReplaceableMinMaxForZone: '// &
'Fraction Replaceable must be 0.0 or 1.0 if used with daylighting.')
CALL ShowContinueError('..Lights="'//TRIM(Lights(Loop)%Name)// &
'", Fraction Replaceable will be reset to 1.0 to allow dimming controls')
CALL ShowContinueError('..in Zone='//TRIM(Zone(WhichZone)%Name))
Lights(Loop)%FractionReplaceable = 1.0d0
END IF
ENDDO
IF (ZoneDaylight(WhichZone)%DaylightType == DetailedDaylighting) THEN
IF (LightsRepMax == 0.0d0) THEN
CALL ShowWarningError('CheckLightsReplaceable: Zone "'//TRIM(Zone(WhichZone)%Name)// &
'" has Daylighting:Controls.')
CALL ShowContinueError('but all of the LIGHTS object in that zone have zero Fraction Replaceable.')
CALL ShowContinueError('The daylighting controls will have no effect.')
ENDIF
IF (NumLights == 0) THEN
CALL ShowWarningError('CheckLightsReplaceable: Zone "'//TRIM(Zone(WhichZone)%Name)// &
'" has Daylighting:Controls.')
CALL ShowContinueError('but there are no LIGHTS objects in that zone.')
CALL ShowContinueError('The daylighting controls will have no effect.')
ENDIF
ELSEIF (ZoneDaylight(WhichZone)%DaylightType == DElightDaylighting) THEN
IF (LightsRepMax == 0.0d0) THEN
CALL ShowWarningError('CheckLightsReplaceable: Zone "'//TRIM(Zone(WhichZone)%Name)// &
'" has Daylighting:Controls.')
CALL ShowContinueError('but all of the LIGHTS object in that zone have zero Fraction Replaceable.')
CALL ShowContinueError('The daylighting controls will have no effect.')
ENDIF
IF (NumLights == 0) THEN
CALL ShowWarningError('CheckLightsReplaceable: Zone "'//TRIM(Zone(WhichZone)%Name)// &
'" has Daylighting:Controls.')
CALL ShowContinueError('but there are no LIGHTS objects in that zone.')
CALL ShowContinueError('The daylighting controls will have no effect.')
ENDIF
ENDIF
RETURN
END SUBROUTINE CheckLightsReplaceableMinMaxForZone