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 ReportMeterDetails
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN January 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Writes the meter details report. This shows which variables are on
! meters as well as the meter contents.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: VarMeter
INTEGER :: VarMeter1
INTEGER :: Meter
CHARACTER(len=16) :: MtrUnits ! Units for Meter
INTEGER :: I
CHARACTER(len=32) :: String
CHARACTER(len=80) :: Multipliers
INTEGER :: ZoneMult ! Zone Multiplier
INTEGER :: ZoneListMult ! Zone List Multiplier
LOGICAL CustDecWritten
DO VarMeter=1,NumVarMeterArrays
MtrUnits=RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%UnitsString
Multipliers = ''
ZoneMult = RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarPtr%ZoneMult
ZoneListMult = RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarPtr%ZoneListMult
IF (ZoneMult > 1 .or. ZoneListMult > 1) THEN
WRITE(String,*) ZoneMult * ZoneListMult
Multipliers = ' * '//ADJUSTL(String)
WRITE(String,*) ZoneMult
Multipliers = TRIM(Multipliers)//' (Zone Multiplier = '//ADJUSTL(String)
WRITE(String,*) ZoneListMult
Multipliers = TRIM(Multipliers)//', Zone List Multiplier = '//TRIM(ADJUSTL(String))//')'
ENDIF
WRITE(OutputFileMeterDetails,'(/,A)') ' Meters for '// &
TRIM(RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarPtr%ReportIDChr)//','// &
TRIM(RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarName)// &
' ['//TRIM(MtrUnits)//']'// &
TRIM(Multipliers)
DO I=1,VarMeterArrays(VarMeter)%NumOnMeters
WRITE(OutputFileMeterDetails,fmta) ' OnMeter='// &
TRIM(EnergyMeters(VarMeterArrays(VarMeter)%OnMeters(I))%Name)// &
' ['//TRIM(MtrUnits)//']'
ENDDO
DO I=1,VarMeterArrays(VarMeter)%NumOnCustomMeters
WRITE(OutputFileMeterDetails,fmta) ' OnCustomMeter='// &
TRIM(EnergyMeters(VarMeterArrays(VarMeter)%OnCustomMeters(I))%Name)// &
' ['//TRIM(MtrUnits)//']'
ENDDO
ENDDO
DO Meter=1,NumEnergyMeters
WRITE(OutputFileMeterDetails,'(/,A)',ADVANCE='No') ' For Meter='//TRIM(EnergyMeters(Meter)%Name)//' ['// &
TRIM(EnergyMeters(Meter)%Units)//']'
IF (EnergyMeters(Meter)%ResourceType /= ' ') WRITE(OutputFileMeterDetails,fmta,ADVANCE='No') &
', ResourceType='//TRIM(EnergyMeters(Meter)%ResourceType)
IF (EnergyMeters(Meter)%EndUse /= ' ') WRITE(OutputFileMeterDetails,fmta,ADVANCE='No') &
', EndUse='//TRIM(EnergyMeters(Meter)%EndUse)
IF (EnergyMeters(Meter)%Group /= ' ') WRITE(OutputFileMeterDetails,fmta,ADVANCE='No') &
', Group='//TRIM(EnergyMeters(Meter)%Group)
WRITE(OutputFileMeterDetails,fmta) ', contents are:'
CustDecWritten=.false.
DO VarMeter=1,NumVarMeterArrays
IF (EnergyMeters(Meter)%TypeOfMeter == MeterType_Normal) THEN
IF (ANY(VarMeterArrays(VarMeter)%OnMeters == Meter) ) THEN
DO VarMeter1=1,VarMeterArrays(VarMeter)%NumOnMeters
IF (VarMeterArrays(VarMeter)%OnMeters(VarMeter1) /= Meter) CYCLE
Multipliers = ''
ZoneMult = RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarPtr%ZoneMult
ZoneListMult = RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarPtr%ZoneListMult
IF (ZoneMult > 1 .or. ZoneListMult > 1) THEN
WRITE(String,*) ZoneMult * ZoneListMult
Multipliers = ' * '//ADJUSTL(String)
WRITE(String,*) ZoneMult
Multipliers = TRIM(Multipliers)//' (Zone Multiplier = '//ADJUSTL(String)
WRITE(String,*) ZoneListMult
Multipliers = TRIM(Multipliers)//', Zone List Multiplier = '//TRIM(ADJUSTL(String))//')'
END IF
WRITE(OutputFileMeterDetails,fmta) ' '//TRIM(RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarName)// &
TRIM(Multipliers)
ENDDO
ENDIF
ENDIF
IF (EnergyMeters(Meter)%TypeOfMeter /= MeterType_Normal) THEN
IF (VarMeterArrays(VarMeter)%NumOnCustomMeters > 0) THEN
IF (ANY(VarMeterArrays(VarMeter)%OnCustomMeters == Meter) ) THEN
IF (.not. CustDecWritten .and. EnergyMeters(Meter)%TypeOfMeter == MeterType_CustomDec) THEN
WRITE(OutputFileMeterDetails,fmta) ' Values for this meter will be Source Meter='// &
TRIM(EnergyMeters(EnergyMeters(Meter)%SourceMeter)%Name)//'; but will be decremented by:'
CustDecWritten=.true.
ENDIF
DO VarMeter1=1,VarMeterArrays(VarMeter)%NumOnCustomMeters
IF (VarMeterArrays(VarMeter)%OnCustomMeters(VarMeter1) /= Meter) CYCLE
Multipliers = ''
ZoneMult = RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarPtr%ZoneMult
ZoneListMult = RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarPtr%ZoneListMult
IF (ZoneMult > 1 .OR. ZoneListMult > 1) THEN
WRITE(String,*) ZoneMult * ZoneListMult
Multipliers = ' * '//ADJUSTL(String)
WRITE(String,*) ZoneMult
Multipliers = TRIM(Multipliers)//' (Zone Multiplier = '//ADJUSTL(String)
WRITE(String,*) ZoneListMult
Multipliers = TRIM(Multipliers)//', Zone List Multiplier = '//TRIM(ADJUSTL(String))//')'
END IF
WRITE(OutputFileMeterDetails,fmta) ' '//TRIM(RVariableTypes(VarMeterArrays(VarMeter)%RepVariable)%VarName)// &
TRIM(Multipliers)
ENDDO
ENDIF
ENDIF
ENDIF
ENDDO
ENDDO
RETURN
END SUBROUTINE ReportMeterDetails