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) | :: | AirLoopNum |
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 SetupAirLoopControllersTracer( AirLoopNum )
! SUBROUTINE INFORMATION:
! AUTHOR Dimitri Curtil
! DATE WRITTEN February 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Opens main trace file for controllers on specific air loop
! and writes header row with titles.
! METHODOLOGY EMPLOYED:
! Needs description, as appropriate.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataAirSystems, ONLY : PrimaryAirSystem
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, INTENT(IN) :: AirLoopNum
! INTERFACE BLOCK SPECIFICATIONS
INTEGER, EXTERNAL :: GetNewUnitNumber
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(LEN=MaxNameLength) :: TraceFileName
INTEGER :: TraceFileUnit
INTEGER :: ControllerNum
! Open main controller trace file for each air loop
TraceFileName(:) = ' '
TraceFileName = 'controller.'//TRIM(PrimaryAirSystem(AirLoopNum)%Name)//'.csv'
TraceFileName = ADJUSTL(TraceFileName)
TraceFileUnit = GetNewUnitNumber()
IF ( TraceFileUnit <= 0 ) THEN
CALL ShowWarningError( &
'SetupAirLoopControllersTracer: Invalid unit for air loop controllers trace file="'// &
TRIM(TraceFileName)//'"')
RETURN
END IF
! Store file unit in air loop stats
AirLoopStats(AirLoopNum)%TraceFileUnit = TraceFileUnit
OPEN(UNIT=TraceFileUnit, FILE=TraceFileName, Action='write', ERR=100)
! List all controllers and their corrresponding handles into main trace file
WRITE(TraceFileUnit,'(2(A,A))') &
'Num', ',', &
'Name', ','
DO ControllerNum = 1,PrimaryAirSystem(AirLoopNum)%NumControllers
WRITE(TraceFileUnit,'(1(A,A),1(A,A))') &
TRIM(TrimSigDigits(ControllerNum)), ',', &
PrimaryAirSystem(AirLoopNum)%ControllerName(ControllerNum), ','
! SAME AS ControllerProps(ControllerIndex)%ControllerName BUT NOT YET AVAILABLE
END DO
! Skip a bunch of lines
WRITE(TraceFileUnit,*)
WRITE(TraceFileUnit,*)
WRITE(TraceFileUnit,*)
! Write column header in main contoller trace file
WRITE(TraceFileUnit,'(12(A,A))',ADVANCE='No') &
'ZoneSizingCalc', ',', &
'SysSizingCalc', ',', &
'EnvironmentNum', ',', &
'WarmupFlag', ',', &
'SysTimeStamp', ',', &
'SysTimeInterval', ',', &
'BeginTimeStepFlag', ',', &
'FirstTimeStepSysFlag', ',', &
'FirstHVACIteration', ',', &
'AirLoopPass', ',', &
'AirLoopNumCallsTot', ',', &
'AirLoopConverged', ','
! Write headers for final state
DO ControllerNum = 1,PrimaryAirSystem(AirLoopNum)%NumControllers
WRITE(TraceFileUnit,'(5(A,A,A))',ADVANCE='No') &
'Mode', TRIM(TrimSigDigits(ControllerNum)), ',', &
'IterMax', TRIM(TrimSigDigits(ControllerNum)), ',', &
'XRoot', TRIM(TrimSigDigits(ControllerNum)), ',', &
'YRoot', TRIM(TrimSigDigits(ControllerNum)), ',', &
'YSetPoint', TRIM(TrimSigDigits(ControllerNum)), ','
END DO
! Finally goto next line
WRITE(TraceFileUnit,*)
RETURN
100 CONTINUE
CALL ShowFatalError( &
'SetupAirLoopControllersTracer: Failed to open air loop trace file "'//TRIM(TraceFileName)//'" for output (write).' &
)
RETURN
END SUBROUTINE SetupAirLoopControllersTracer