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.
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 ReportCompSetMeterVariables
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN May 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Reports comp set meter variables.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
use dataglobals, only: outputfiledebug
USE DataBranchNodeConnections
USE BranchNodeConnections
USE DataGlobalConstants
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
INTERFACE GetNumMeteredVariables
FUNCTION GetNumMeteredVariables(ComponentType,ComponentName) RESULT(NumVariables)
CHARACTER(len=*), INTENT(IN) :: ComponentType ! Given Component Type
CHARACTER(len=*), INTENT(IN) :: ComponentName ! Given Component Name (user defined)
INTEGER :: NumVariables
END FUNCTION
END INTERFACE
INTERFACE GetMeteredVariables
SUBROUTINE GetMeteredVariables(ComponentType,ComponentName,VarIndexes,VarTypes,IndexTypes, &
UnitsStrings,ResourceTypes,EndUses,Groups,Names,NumFound,VarIDs)
CHARACTER(len=*), INTENT(IN) :: ComponentType ! Given Component Type
CHARACTER(len=*), INTENT(IN) :: ComponentName ! Given Component Name (user defined)
INTEGER, DIMENSION(:), INTENT(OUT) :: VarIndexes ! Variable Numbers
INTEGER, DIMENSION(:), INTENT(OUT) :: VarTypes ! Variable Types (1=integer, 2=real, 3=meter)
INTEGER, DIMENSION(:), INTENT(OUT) :: IndexTypes ! Variable Index Types (1=Zone,2=HVAC)
CHARACTER(len=*), DIMENSION(:), INTENT(OUT) :: UnitsStrings ! UnitsStrings for each variable
INTEGER, DIMENSION(:), INTENT(OUT) :: ResourceTypes ! ResourceTypes for each variable
CHARACTER(len=*), DIMENSION(:), &
OPTIONAL, INTENT(OUT) :: EndUses ! EndUses for each variable
CHARACTER(len=*), DIMENSION(:), &
OPTIONAL, INTENT(OUT) :: Groups ! Groups for each variable
CHARACTER(len=*), DIMENSION(:), &
OPTIONAL, INTENT(OUT) :: Names ! Variable Names for each variable
INTEGER, OPTIONAL, INTENT(OUT) :: NumFound ! Number Found
INTEGER, DIMENSION(:), OPTIONAL, INTENT(OUT) :: VarIDs ! Variable Report Numbers
END SUBROUTINE
END INTERFACE
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: Loop
INTEGER :: Loop1
INTEGER :: NumVariables
INTEGER, DIMENSION(:), ALLOCATABLE :: VarIndexes
INTEGER, DIMENSION(:), ALLOCATABLE :: VarIDs
INTEGER, DIMENSION(:), ALLOCATABLE :: IndexTypes
INTEGER, DIMENSION(:), ALLOCATABLE :: VarTypes
CHARACTER(len=MaxNameLength), DIMENSION(:), ALLOCATABLE :: UnitsStrings
CHARACTER(len=MaxNameLength*2+1), DIMENSION(:), ALLOCATABLE :: VarNames
INTEGER, DIMENSION(:), ALLOCATABLE :: ResourceTypes
CHARACTER(len=MaxNameLength), DIMENSION(:), ALLOCATABLE :: EndUses
CHARACTER(len=MaxNameLength), DIMENSION(:), ALLOCATABLE :: Groups
WRITE(outputfiledebug,'(A)') ' CompSet,ComponentType,ComponentName,NumMeteredVariables'
WRITE(outputfiledebug,'(A)') ' RepVar,ReportIndex,ReportID,ReportName,Units,ResourceType,EndUse,Group,IndexType'
DO Loop=1,NumCompSets
NumVariables=GetNumMeteredVariables(CompSets(Loop)%CType,CompSets(Loop)%CName)
write(outputfiledebug,'(1X,"CompSet,",A,",",A,",",I5)') TRIM(CompSets(Loop)%CType),TRIM(CompSets(Loop)%CName),NumVariables
IF (NumVariables <= 0) CYCLE
ALLOCATE(VarIndexes(NumVariables))
VarIndexes=0
ALLOCATE(VarIDs(NumVariables))
VarIDs=0
ALLOCATE(IndexTypes(NumVariables))
IndexTypes=0
ALLOCATE(VarTypes(NumVariables))
VarTypes=0
ALLOCATE(VarNames(NumVariables))
VarNames=' '
ALLOCATE(UnitsStrings(NumVariables))
UnitsStrings=' '
ALLOCATE(ResourceTypes(NumVariables))
ResourceTypes=0
ALLOCATE(EndUses(NumVariables))
EndUses=' '
ALLOCATE(Groups(NumVariables))
Groups=' '
CALL GetMeteredVariables(CompSets(Loop)%CType,CompSets(Loop)%CName,VarIndexes,VarTypes,IndexTypes, &
UnitsStrings,Names=VarNames,ResourceTypes=ResourceTypes,EndUses=EndUses, &
Groups=Groups,VarIDs=VarIDs)
DO Loop1=1,NumVariables
write(outputfiledebug,'(1X,"RepVar,",I5,",",I5,",",A,",[",A,"],",A,",",A,",",A,",",I5)') &
VarIndexes(Loop1),VarIDs(Loop1),TRIM(VarNames(Loop1)), &
TRIM(UnitsStrings(Loop1)),TRIM(GetResourceTypeChar(ResourceTypes(Loop1))),TRIM(EndUses(Loop1)), &
TRIM(Groups(Loop1)),IndexTypes(Loop1)
ENDDO
DEALLOCATE(VarIndexes)
DEALLOCATE(IndexTypes)
DEALLOCATE(VarTypes)
DEALLOCATE(VarIDs)
DEALLOCATE(VarNames)
DEALLOCATE(UnitsStrings)
DEALLOCATE(ResourceTypes)
DEALLOCATE(EndUses)
DEALLOCATE(Groups)
ENDDO
RETURN
END SUBROUTINE ReportCompSetMeterVariables