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 UpdateEMSTrendVariables
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN May 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Logged trend data
! METHODOLOGY EMPLOYED:
! Store current value of Erl Variable in Trend stack
! Trend arrays are pushed so that the latest value is
! always at index 1. old values get lost.
! REFERENCES:
! na
! USE STATEMENTS:
Use DataGlobals, ONLY: AnyEnergyManagementSystemInModel
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:
! na
INTEGER :: TrendNum = 0 ! local loop counter
INTEGER :: ErlVarNum = 0 !
INTEGER :: TrendDepth = 0
REAL(r64) :: currentVal = 0.0D0
! checks with quick return if no updates needed.
IF (.NOT. AnyEnergyManagementSystemInModel) RETURN
IF (NumErlTrendVariables == 0) RETURN
DO TrendNum = 1, NumErlTrendVariables
ErlVarNum = TrendVariable(TrendNum)%ErlVariablePointer
TrendDepth = TrendVariable(TrendNum)%LogDepth
IF ((ErlVarNum > 0) .AND. (TrendDepth > 0)) THEN
currentVal = ErlVariable(ErlVarNum)%Value%Number
! push into trend
TrendVariable(TrendNum)%tempTrendARR = TrendVariable(TrendNum)%TrendValARR
TrendVariable(TrendNum)%TrendValARR(1) = currentVal
TrendVariable(TrendNum)%TrendValARR(2:TrendDepth) = &
TrendVariable(TrendNum)%tempTrendARR(1:TrendDepth -1)
ENDIF
ENDDO
RETURN
END SUBROUTINE UpdateEMSTrendVariables