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) | :: | WhichMeter | |||
logical, | intent(in) | :: | MeterFileOnlyIndicator | |||
integer, | intent(in) | :: | FrequencyIndicator | |||
logical, | intent(in) | :: | CumulativeIndicator |
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 SetInitialMeterReportingAndOutputNames(WhichMeter,MeterFileOnlyIndicator,FrequencyIndicator,CumulativeIndicator)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN February 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Set values and output initial names to output files.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPrecisionGlobals
USE OutputProcessor
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: WhichMeter ! Which meter number
LOGICAL, INTENT(IN) :: MeterFileOnlyIndicator ! true if this is a meter file only reporting
INTEGER, INTENT(IN) :: FrequencyIndicator ! at what frequency is the meter reported
LOGICAL, INTENT(IN) :: CumulativeIndicator ! true if this is a Cumulative meter reporting
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: indexGroupKey
CHARACTER(len=MaxNameLength) :: indexGroup
SELECT CASE (FrequencyIndicator)
CASE (-1:0) ! roll "detailed" into TimeStep
IF (.not. CumulativeIndicator) THEN
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptTS) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "'// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (TimeStep), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptTS) THEN
EnergyMeters(WhichMeter)%RptTS=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptTSFO=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%TSRptNum, &
indexGroupKey, indexGroup, EnergyMeters(WhichMeter)%TSRptNumChr, EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .false., MeterFileOnlyIndicator)
ENDIF
ELSE
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptAccTS) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "Cumulative '// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (TimeStep), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptAccTS) THEN
EnergyMeters(WhichMeter)%RptAccTS=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptAccTSFO=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%TSAccRptNum, &
indexGroupKey, indexGroup, TrimSigDigits(EnergyMeters(WhichMeter)%TSAccRptNum), &
EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .true., MeterFileOnlyIndicator)
ENDIF
ENDIF
CASE (1)
IF (.not. CumulativeIndicator) THEN
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptHR) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "'// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (Hourly), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptHR) THEN
EnergyMeters(WhichMeter)%RptHR=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptHRFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingHourlyVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%HRRptNum, indexGroupKey, &
indexGroup,EnergyMeters(WhichMeter)%HRRptNumChr, EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .false., MeterFileOnlyIndicator)
ENDIF
ELSE
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptAccHR) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "Cumulative '// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (Hourly), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptAccHR) THEN
EnergyMeters(WhichMeter)%RptAccHR=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptAccHRFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingHourlyVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%HRAccRptNum, indexGroupKey, &
indexGroup,TrimSigDigits(EnergyMeters(WhichMeter)%HRAccRptNum), EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .true., MeterFileOnlyIndicator)
ENDIF
ENDIF
CASE (2)
IF (.not. CumulativeIndicator) THEN
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptDY) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "'// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (Daily), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptDY) THEN
EnergyMeters(WhichMeter)%RptDY=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptDYFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingDailyVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%DYRptNum, indexGroupKey, &
indexGroup,EnergyMeters(WhichMeter)%DYRptNumChr, EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .false., MeterFileOnlyIndicator)
ENDIF
ELSE
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptAccDY) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "Cumulative '// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (Hourly), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptAccDY) THEN
EnergyMeters(WhichMeter)%RptAccDY=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptAccDYFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingDailyVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%DYAccRptNum, indexGroupKey, &
indexGroup,TrimSigDigits(EnergyMeters(WhichMeter)%DYAccRptNum), EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .true., MeterFileOnlyIndicator)
ENDIF
ENDIF
CASE (3)
IF (.not. CumulativeIndicator) THEN
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptMN) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "'// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (Monthly), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptMN) THEN
EnergyMeters(WhichMeter)%RptMN=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptMNFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingMonthlyVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%MNRptNum, indexGroupKey, &
indexGroup,EnergyMeters(WhichMeter)%MNRptNumChr, EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .false., MeterFileOnlyIndicator)
ENDIF
ELSE
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptAccMN) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "Cumulative '// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (Monthly), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptAccMN) THEN
EnergyMeters(WhichMeter)%RptAccMN=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptAccMNFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingMonthlyVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%MNAccRptNum, indexGroupKey, &
indexGroup,TrimSigDigits(EnergyMeters(WhichMeter)%MNAccRptNum), EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .true., MeterFileOnlyIndicator)
ENDIF
ENDIF
CASE (4)
IF (.not. CumulativeIndicator) THEN
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptSM) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "'// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (RunPeriod), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptSM) THEN
EnergyMeters(WhichMeter)%RptSM=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptSMFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingRunPeriodVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%SMRptNum, indexGroupKey, &
indexGroup,EnergyMeters(WhichMeter)%SMRptNumChr, EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .false., MeterFileOnlyIndicator)
ENDIF
ELSE
IF (MeterFileOnlyIndicator) THEN
IF (EnergyMeters(WhichMeter)%RptAccSM) THEN
CALL ShowWarningError('Output:Meter:MeterFileOnly requested for "Cumulative '// &
TRIM(EnergyMeters(WhichMeter)%Name)//'" (RunPeriod), '// &
'already on "Output:Meter". Will report to both eplusout.eso and eplusout.mtr.')
ENDIF
ENDIF
IF (.not. EnergyMeters(WhichMeter)%RptAccSM) THEN
EnergyMeters(WhichMeter)%RptAccSM=.true.
IF (MeterFileOnlyIndicator) EnergyMeters(WhichMeter)%RptAccSMFO=.true.
IF (.not. MeterFileOnlyIndicator) TrackingRunPeriodVariables=.true.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(WhichMeter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(WhichMeter))
CALL WriteMeterDictionaryItem (FrequencyIndicator, SummedVar, EnergyMeters(WhichMeter)%SMAccRptNum, indexGroupKey, &
indexGroup,TrimSigDigits(EnergyMeters(WhichMeter)%SMAccRptNum), EnergyMeters(WhichMeter)%Name, &
EnergyMeters(WhichMeter)%Units, .true., MeterFileOnlyIndicator)
ENDIF
ENDIF
CASE DEFAULT
END SELECT
RETURN
END SUBROUTINE SetInitialMeterReportingAndOutputNames