Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | TimeStamp |
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 UpdateMeters(TimeStamp)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN April 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine updates the meters with the current time step value
! for each meter. Also, sets min/max values for hourly...run period reporting.
! METHODOLOGY EMPLOYED:
! Goes thru the number of meters, setting min/max as appropriate. Uses timestamp
! from calling program.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: TimeStamp ! Current TimeStamp (for max/min)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER Meter ! Loop Control
DO Meter=1,NumEnergyMeters
IF (EnergyMeters(Meter)%TypeOfMeter /= MeterType_CustomDec .and. &
EnergyMeters(Meter)%TypeOfMeter /= MeterType_CustomDiff) THEN
EnergyMeters(Meter)%TSValue=EnergyMeters(Meter)%TSValue+MeterValue(Meter)
EnergyMeters(Meter)%HRValue=EnergyMeters(Meter)%HRValue+MeterValue(Meter)
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%HRMaxVal,EnergyMeters(Meter)%HRMaxValDate, &
EnergyMeters(Meter)%HRMinVal,EnergyMeters(Meter)%HRMinValDate)
EnergyMeters(Meter)%DYValue=EnergyMeters(Meter)%DYValue+MeterValue(Meter)
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%DYMaxVal,EnergyMeters(Meter)%DYMaxValDate, &
EnergyMeters(Meter)%DYMinVal,EnergyMeters(Meter)%DYMinValDate)
EnergyMeters(Meter)%MNValue=EnergyMeters(Meter)%MNValue+MeterValue(Meter)
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%MNMaxVal,EnergyMeters(Meter)%MNMaxValDate, &
EnergyMeters(Meter)%MNMinVal,EnergyMeters(Meter)%MNMinValDate)
EnergyMeters(Meter)%SMValue=EnergyMeters(Meter)%SMValue+MeterValue(Meter)
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%SMMaxVal,EnergyMeters(Meter)%SMMaxValDate, &
EnergyMeters(Meter)%SMMinVal,EnergyMeters(Meter)%SMMinValDate)
ELSE
EnergyMeters(Meter)%TSValue=EnergyMeters(EnergyMeters(Meter)%SourceMeter)%TSValue-MeterValue(Meter)
EnergyMeters(Meter)%HRValue=EnergyMeters(Meter)%HRValue + EnergyMeters(Meter)%TSValue
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%HRMaxVal,EnergyMeters(Meter)%HRMaxValDate, &
EnergyMeters(Meter)%HRMinVal,EnergyMeters(Meter)%HRMinValDate)
EnergyMeters(Meter)%DYValue=EnergyMeters(Meter)%DYValue + EnergyMeters(Meter)%TSValue
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%DYMaxVal,EnergyMeters(Meter)%DYMaxValDate, &
EnergyMeters(Meter)%DYMinVal,EnergyMeters(Meter)%DYMinValDate)
EnergyMeters(Meter)%MNValue=EnergyMeters(Meter)%MNValue + EnergyMeters(Meter)%TSValue
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%MNMaxVal,EnergyMeters(Meter)%MNMaxValDate, &
EnergyMeters(Meter)%MNMinVal,EnergyMeters(Meter)%MNMinValDate)
EnergyMeters(Meter)%SMValue=EnergyMeters(Meter)%SMValue + EnergyMeters(Meter)%TSValue
CALL SetMinMax(EnergyMeters(Meter)%TSValue,TimeStamp,EnergyMeters(Meter)%SMMaxVal,EnergyMeters(Meter)%SMMaxValDate, &
EnergyMeters(Meter)%SMMinVal,EnergyMeters(Meter)%SMMinValDate)
ENDIF
ENDDO
MeterValue=0.0d0 ! Ready for next update
RETURN
END SUBROUTINE UpdateMeters