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 UpdateScheduleValues
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN August 2011; adapted from Autodesk (time reduction)
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine calculates all the scheduled values as a time reduction measure and
! stores them in the CurrentValue item of the schedule data structure.
! METHODOLOGY EMPLOYED:
! Use internal Schedule data structure to calculate current value. Note that missing values in
! input will equate to 0 indices in arrays -- which has been set up to return legally with
! 0.0 values.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataEnvironment, ONLY: DayOfYear_Schedule
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 ScheduleIndex
INTEGER WhichHour
INTEGER WeekSchedulePointer
INTEGER DaySchedulePointer
IF (.not. ScheduleInputProcessed) THEN
CALL ProcessScheduleInput
ScheduleInputProcessed=.true.
ENDIF
WhichHour=HourOfDay+DSTIndicator
DO ScheduleIndex=1,NumSchedules
! Determine which Week Schedule is used
! Cant use stored day of year because of leap year inconsistency
WeekSchedulePointer=Schedule(ScheduleIndex)%WeekSchedulePointer(DayOfYear_Schedule)
! Now, which day?
IF (DayofWeek <= 7 .and. HolidayIndex > 0) THEN
DaySchedulePointer=WeekSchedule(WeekSchedulePointer)%DaySchedulePointer(7+HolidayIndex)
ELSE
DaySchedulePointer=WeekSchedule(WeekSchedulePointer)%DaySchedulePointer(DayofWeek)
ENDIF
! Hourly Value
IF (WhichHour <= 24) THEN
Schedule(ScheduleIndex)%CurrentValue=DaySchedule(DaySchedulePointer)%TSValue(WhichHour,TimeStep)
ELSEIF (TimeStep <= NumOfTimeStepInHour) THEN
Schedule(ScheduleIndex)%CurrentValue=DaySchedule(DaySchedulePointer)%TSValue(WhichHour-24,TimeStep)
ELSE
Schedule(ScheduleIndex)%CurrentValue=DaySchedule(DaySchedulePointer)%TSValue(WhichHour-24,NumOfTimeStepInHour)
ENDIF
ENDDO
RETURN
END SUBROUTINE UpdateScheduleValues