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) | :: | NodeNumber | |||
logical, | intent(out) | :: | Okay |
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 CheckAndAddAirNodeNumber(NodeNumber,Okay)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN March 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! At the time of writing, some items (namely Chillers) have "made up" node
! names for nodes that are "outside air nodes". Rather than fatal out, add
! this subroutine which will check and then add a outside air node, if necessary.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE Psychrometrics, ONLY: PsyHFnTdbW
USE NodeInputManager
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: NodeNumber ! Number of node to check to see if in Outside Air list
LOGICAL, INTENT(OUT) :: Okay ! True if found, false if not
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER, ALLOCATABLE, DIMENSION(:) :: TmpNums
INTEGER :: DummyNumber
LOGICAL :: errflag=.false.
IF (GetOutAirNodesInputFlag) THEN ! First time subroutine has been entered
CALL GetOutAirNodesInput ! Get Out Air Nodes data
GetOutAirNodesInputFlag = .FALSE.
CALL SetOutAirNodes
END IF
Okay=.false.
IF(NumOutsideAirNodes > 0)THEN
IF (ANY(OutsideAirNodeList == NodeNumber)) THEN
Okay=.true.
ELSE
Okay=.false.
ENDIF
ELSE
Okay=.false.
END IF
IF (NodeNumber > 0) THEN
IF (.not. Okay) THEN
! Add new outside air node to list
ALLOCATE(TmpNums(NumOutsideAirNodes+1))
IF (NumOutsideAirNodes > 0)THEN
TmpNums(1:NumOutsideAirNodes)=OutsideAirNodeList
DEALLOCATE(OutsideAirNodeList)
ELSE
TmpNums(1:1)=NodeNumber
END IF
NumOutsideAirNodes=NumOutsideAirNodes+1
ALLOCATE(OutsideAirNodeList(NumOutsideAirNodes))
OutsideAirNodeList=TmpNums
OutsideAirNodeList(NumOutsideAirNodes)=NodeNumber
!register new node..
CALL GetNodeNums(NodeID(NodeNumber),DummyNumber,TmpNums,errflag,NodeType_Air, &
'OutdoorAir:Node','OutdoorAir:Node',NodeConnectionType_OutsideAir, &
NumOutsideAirNodes,ObjectIsNotParent,IncrementFluidStreamYes)
DEALLOCATE(TmpNums)
IF (Node(NodeNumber)%Height < 0.0d0) THEN
Node(NodeNumber)%OutAirDryBulb = OutDryBulbTemp
Node(NodeNumber)%OutAirWetBulb = OutWetBulbTemp
ELSE
Node(NodeNumber)%OutAirDryBulb = OutDryBulbTempAt(Node(NodeNumber)%Height)
Node(NodeNumber)%OutAirWetBulb = OutWetBulbTempAt(Node(NodeNumber)%Height)
END IF
Node(NodeNumber)%Temp = Node(NodeNumber)%OutAirDryBulb
Node(NodeNumber)%HumRat = OutHumRat
Node(NodeNumber)%Enthalpy = PsyHFnTdbW(Node(NodeNumber)%Temp,OutHumRat)
Node(NodeNumber)%Press = OutBaroPress
Node(NodeNumber)%Quality = 0.0d0
! Add contaminants
IF (Contaminant%CO2Simulation) Node(NodeNumber)%CO2 = OutdoorCo2
IF (Contaminant%GenericContamSimulation) Node(NodeNumber)%GenContam = OutdoorGC
ENDIF
ENDIF
RETURN
END SUBROUTINE CheckAndAddAirNodeNumber