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) | :: | CoolingCoilIndex | |||
| integer, | intent(out) | :: | SupplyFanIndex | |||
| character(len=MaxNameLength), | intent(out) | :: | SupplyFanName | 
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 GetFanIndexForTwoSpeedCoil( CoolingCoilIndex ,SupplyFanIndex, SupplyFanName )
          ! SUBROUTINE INFORMATION:
          !       AUTHOR         <author>
          !       DATE WRITTEN   <date_written>
          !       MODIFIED       na
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          ! This routine looks up the given TwoSpeed DX coil and returns the companion supply fan index
          ! METHODOLOGY EMPLOYED:
          ! <description>
          ! REFERENCES:
          ! na
          ! USE STATEMENTS:
  USE InputProcessor,            ONLY : FindItemInList, SameString
  USE DataAirSystems,            ONLY : PrimaryAirSystem
  USE Fans,                      ONLY : GetFanIndex
  USE DataHVACGlobals,           ONLY : NumPrimaryAirSys
  IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
          ! SUBROUTINE ARGUMENT DEFINITIONS:
  INTEGER,          INTENT(IN)               :: CoolingCoilIndex
  INTEGER,  INTENT(OUT)                      :: SupplyFanIndex
  CHARACTER(len=MaxNameLength), INTENT(OUT)  :: SupplyFanName
          ! SUBROUTINE PARAMETER DEFINITIONS:
  INTEGER, PARAMETER :: DXSystem = 14 ! must match SimAirServingZones.f90 (not public)
  INTEGER, PARAMETER :: Fan_Simple_VAV   = 3 ! must match SimAirServingZones.f90 (not public)
  INTEGER, PARAMETER :: UnitarySystem    = 19 ! must match SimAirServingZones.f90 (not public)
          ! INTERFACE BLOCK SPECIFICATIONS:
          ! na
          ! DERIVED TYPE DEFINITIONS:
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  INTEGER :: FoundBranch
  INTEGER :: FoundAirSysNum
  INTEGER :: AirSysNum
  INTEGER :: BranchNum
  INTEGER :: CompNum
  LOGICAL :: ErrorsFound = .FALSE.
  FoundBranch = 0
  FoundAirSysNum = 0
  SupplyFanIndex = 0
  SupplyFanName = 'n/a'
  DO AirSysNum = 1, NumPrimaryAirSys
    DO BranchNum = 1, PrimaryAirSystem(AirSysNum)%NumBranches
      Do CompNum = 1, PrimaryAirSystem(AirSysNum)%Branch(BranchNum)%TotalComponents
        IF (PrimaryAirSystem(AirSysNum)%Branch(BranchNum)%Comp(CompNum)%CompType_Num == DXSystem) THEN
          IF(SameString(PrimaryAirSystem(AirSysNum)%Branch(BranchNum)%Comp(CompNum)%Name, &
                        DXCoil(CoolingCoilIndex)%CoilSystemName ) ) THEN
            FoundBranch    = BranchNum
            FoundAirSysNum = AirSysNum
            EXIT
          ENDIF
        ! these are specified in SimAirServingZones and need to be moved to a Data* file. UnitarySystem=19
        ELSE IF(PrimaryAirSystem(AirSysNum)%Branch(BranchNum)%Comp(CompNum)%CompType_Num == UnitarySystem)THEN
            FoundBranch    = BranchNum
            FoundAirSysNum = AirSysNum
            EXIT
        ENDIF
      ENDDO
      IF (FoundBranch > 0 .and. FoundAirSysNum >0) THEN
        Do CompNum = 1, PrimaryAirSystem(FoundAirSysNum)%Branch(FoundBranch)%TotalComponents
          IF (PrimaryAirSystem(FoundAirSysNum)%Branch(FoundBranch)%Comp(CompNum)%CompType_Num == Fan_Simple_VAV) THEN
            SupplyFanName  = PrimaryAirSystem(FoundAirSysNum)%Branch(FoundBranch)%Comp(CompNum)%Name
            CALL GetFanIndex(SupplyFanName, SupplyFanIndex, ErrorsFound)
            EXIT
          ! these are specified in SimAirServingZones and need to be moved to a Data* file. UnitarySystem=19
          ELSE IF(PrimaryAirSystem(FoundAirSysNum)%Branch(FoundBranch)%Comp(CompNum)%CompType_Num == UnitarySystem)THEN
            ! fan may not be specified in a unitary system object, keep looking
            ! Unitary System will "set" the fan index to the DX coil if contained within the HVAC system
            IF(DXCoil(CoolingCoilIndex)%SupplyFanIndex > 0)EXIT
          ENDIF
        ENDDO
      ENDIF
    ENDDO
  ENDDO
  RETURN
END SUBROUTINE GetFanIndexForTwoSpeedCoil