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 | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | AvailabilityListName | |||
integer, | intent(in) | :: | Loop | |||
integer, | intent(in) | :: | NumAirLoops | |||
logical, | intent(inout) | :: | ErrorsFound |
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 GetAirLoopAvailabilityManager(AvailabilityListName,Loop,NumAirLoops,ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN August 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets the availability manager data for the indicated air
! loop or for the indicated type of zone equipment component.
! If the PriAirSysAvailMgr structure has not been allocated, it will be allocated
! to "number of air loops".
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataAirLoop
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: AvailabilityListName ! name that should be an Availability Manager List Name
INTEGER, INTENT(IN) :: Loop ! which loop this is
INTEGER, INTENT(IN) :: NumAirLoops ! Total number of air loops
LOGICAL, INTENT(INOUT) :: ErrorsFound ! true if certain errors are detected here
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: Found
INTEGER :: Num
! INTEGER :: CompNumAvailManagers ! Number of availability managers associated with a ZoneHVAC:* component
IF (GetAvailListsInput) THEN
CALL GetSysAvailManagerListInputs
GetAvailListsInput=.FALSE.
ENDIF
IF (.not. ALLOCATED(PriAirSysAvailMgr)) THEN
ALLOCATE(PriAirSysAvailMgr(NumAirLoops))
ENDIF
Found=0
IF (NumAvailManagerLists > 0) &
Found=FindItemInList(AvailabilityListName,SysAvailMgrListData%Name,NumAvailManagerLists)
IF (Found /= 0) THEN
PriAirSysAvailMgr(Loop)%NumAvailManagers = SysAvailMgrListData(Found)%NumItems
PriAirSysAvailMgr(Loop)%AvailStatus = NoAction
PriAirSysAvailMgr(Loop)%StartTime = 0
PriAirSysAvailMgr(Loop)%StopTime = 0
PriAirSysAvailMgr(Loop)%ReqSupplyFrac = 1.0d0
ALLOCATE(PriAirSysAvailMgr(Loop)%AvailManagerName(PriAirSysAvailMgr(Loop)%NumAvailManagers))
ALLOCATE(PriAirSysAvailMgr(Loop)%AvailManagerType(PriAirSysAvailMgr(Loop)%NumAvailManagers))
ALLOCATE(PriAirSysAvailMgr(Loop)%AvailManagerNum(PriAirSysAvailMgr(Loop)%NumAvailManagers))
DO Num=1,PriAirSysAvailMgr(Loop)%NumAvailManagers
PriAirSysAvailMgr(Loop)%AvailManagerName(Num) = SysAvailMgrListData(Found)%AvailManagerName(Num)
PriAirSysAvailMgr(Loop)%AvailManagerNum(Num) = 0
PriAirSysAvailMgr(Loop)%AvailManagerType(Num) = SysAvailMgrListData(Found)%AvailManagerType(Num)
IF (PriAirSysAvailMgr(Loop)%AvailManagerType(Num) == 0) THEN
CALL ShowSevereError('GetAirPathData/GetAirLoopAvailabilityManager: '// &
'Invalid AvailabilityManagerAssignmentList Type entered="'// &
TRIM(SysAvailMgrListData(Found)%cAvailManagerType(Num))//'".')
CALL ShowContinueError('Occurs in AvailabilityManagerAssignmentList="'// &
TRIM(SysAvailMgrListData(Found)%AvailManagerName(Num))//'".')
ErrorsFound=.TRUE.
ENDIF
IF (SysAvailMgrListData(Found)%AvailManagerType(Num) == SysAvailMgr_DiffThermo .and. &
Num /= PriAirSysAvailMgr(Loop)%NumAvailManagers) THEN
CALL ShowWarningError('GetAirPathData/GetAirLoopAvailabilityManager: '// &
'AvailabilityManager:DifferentialThermostat="'// &
TRIM(SysAvailMgrListData(Found)%AvailManagerName(Num))//'".')
CALL ShowContinueError('...is not the last manager on the AvailabilityManagerAssignmentList. '// &
'Any remaining managers will not be used.')
CALL ShowContinueError('Occurs in AvailabilityManagerAssignmentList="'// &
TRIM(SysAvailMgrListData(Found)%AvailManagerName(Num))//'".')
ENDIF
END DO !End of Num Loop
ELSE
IF (AvailabilityListName /= ' ') THEN
CALL ShowWarningError('GetAirPathData/GetAirLoopAvailabilityManager: AvailabilityManagerAssignmentList='// &
TRIM(AvailabilityListName)//' not found in lists. No availability will be used.')
ENDIF
PriAirSysAvailMgr(Loop)%NumAvailManagers = 0
PriAirSysAvailMgr(Loop)%AvailStatus = NoAction
ALLOCATE(PriAirSysAvailMgr(Loop)%AvailManagerName(PriAirSysAvailMgr(Loop)%NumAvailManagers))
ALLOCATE(PriAirSysAvailMgr(Loop)%AvailManagerType(PriAirSysAvailMgr(Loop)%NumAvailManagers))
ALLOCATE(PriAirSysAvailMgr(Loop)%AvailManagerNum(PriAirSysAvailMgr(Loop)%NumAvailManagers))
END IF
RETURN
END SUBROUTINE GetAirLoopAvailabilityManager