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) | :: | ControlNum |
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 SetupIndividualControllerTracer(ControlNum)
! SUBROUTINE INFORMATION:
! AUTHOR Dimitri Curtil
! DATE WRITTEN February 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Opens individual controller trace file for the specified controller
! and writes header row.
! METHODOLOGY EMPLOYED:
! Needs description, as appropriate.
! REFERENCES:
! na
! USE STATEMENTS:
USE RootFinder, ONLY: WriteRootFinderTraceHeader
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ControlNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
INTEGER, EXTERNAL :: GetNewUnitNumber
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(LEN=MaxNameLength) :: TraceFileName
INTEGER :: TraceFileUnit = 0
! Open and write column header in trace file for each individual controller
TraceFileUnit = GetNewUnitNumber()
IF ( TraceFileUnit <= 0 ) THEN
CALL ShowFatalError( &
'SetupIndividualControllerTracer: Invalid unit (<=0) for setting up controller trace file')
RETURN
END IF
TraceFileName(:) = ' '
TraceFileName = 'controller.'//TRIM(ControllerProps(ControlNum)%ControllerName)//'.csv'
TraceFileName = ADJUSTL(TraceFileName)
!WRITE(*,*) 'Trace file name="', TRIM(TraceFileName) , '"'
OPEN(UNIT=TraceFileUnit, FILE=TraceFileName, Action='write', ERR=100)
! Store trace file unit
ControllerProps(ControlNum)%TraceFileUnit = TraceFileUnit
! Write header row
WRITE(TraceFileUnit,'(19(A,A))',ADVANCE='No') &
'EnvironmentNum', ',', &
'WarmupFlag', ',', &
'SysTimeStamp', ',', &
'SysTimeInterval', ',', &
'AirLoopPass', ',', &
'FirstHVACIteration', ',', &
'Operation', ',', &
'NumCalcCalls', ',', &
! Masss flow rate
'SensedNode%MassFlowRate', ',', &
'ActuatedNode%MassFlowRateMinAvail', ',', &
'ActuatedNode%MassFlowRateMaxAvail', ',', &
! Convergence analysis
'X', ',', &
'Y', ',', &
'Setpoint', ',', &
'DeltaSensed', ',', &
'Offset', ',', &
'Mode', ',', &
'IsConvergedFlag', ',', &
'NextActuatedValue', ','
CALL WriteRootFinderTraceHeader( TraceFileUnit )
! Finally skip line
WRITE(TraceFileUnit,*)
RETURN
100 CONTINUE
CALL ShowFatalError( &
'SetupIndividualControllerTracer: Failed to open controller trace file "'//TRIM(TraceFileName)//'" for output (write).' &
)
RETURN
END SUBROUTINE SetupIndividualControllerTracer