| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=r64), | intent(in) | :: | TimeStepValue | |||
| integer, | intent(in) | :: | NumOnMeters | |||
| integer, | intent(in), | DIMENSION(:) | :: | OnMeters | ||
| integer, | intent(in), | optional | :: | NumOnCustomMeters | ||
| integer, | intent(in), | optional | DIMENSION(:) | :: | OnCustomMeters | 
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 UpdateMeterValues(TimeStepValue,NumOnMeters,OnMeters,NumOnCustomMeters,OnCustomMeters)
          ! SUBROUTINE INFORMATION:
          !       AUTHOR         Linda Lawrie
          !       DATE WRITTEN   January 2001
          !       MODIFIED       na
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          ! This subroutine updates all the meter values in the lists with the current
          ! time step value for this variable.
          ! METHODOLOGY EMPLOYED:
          ! Variables, as they are "setup", may or may not be on one or more meters.
          ! All "metered" variables are on the "facility meter".  Index values will be
          ! set from the variables to the appropriate meters.  Then, the updating of
          ! the meter values is quite simple -- just add the time step value of the variable
          ! (which is passed to this routine) to all the values being kept for the meter.
          ! Reporting of the meters is taken care of in a different routine.  During reporting,
          ! some values will also be reset (for example, after reporting the "hour", the new
          ! "hour" value of the meter is reset to 0.0, etc.
          ! REFERENCES:
          ! na
          ! USE STATEMENTS:
          ! na
  IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
          ! SUBROUTINE ARGUMENT DEFINITIONS:
  REAL(r64), INTENT(IN)                  :: TimeStepValue  ! Value of this variable at the current time step.
  INTEGER, INTENT(IN)               :: NumOnMeters    ! Number of meters this variable is "on".
  INTEGER, INTENT(IN), DIMENSION(:) :: OnMeters       ! Which meters this variable is on (index values)
  INTEGER, INTENT(IN), OPTIONAL               :: NumOnCustomMeters  ! Number of custom meters this variable is "on".
  INTEGER, INTENT(IN), DIMENSION(:), OPTIONAL :: OnCustomMeters       ! Which custom meters this variable is on (index values)
          ! SUBROUTINE PARAMETER DEFINITIONS:
          ! na
          ! INTERFACE BLOCK SPECIFICATIONS:
          ! na
          ! DERIVED TYPE DEFINITIONS:
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  INTEGER Meter   ! Loop Control
  INTEGER Which   ! Index value for the meter
  DO Meter=1,NumOnMeters
    Which=OnMeters(Meter)
    MeterValue(Which)=MeterValue(Which)+TimeStepValue
  ENDDO
  ! This calculates the basic values for decrement/difference meters -- UpdateMeters then calculates the actual.
  IF (PRESENT(NumOnCustomMeters)) THEN
    DO Meter=1,NumOnCustomMeters
      Which=OnCustomMeters(Meter)
      MeterValue(Which)=MeterValue(Which)+TimeStepValue
    ENDDO
  ENDIF
  RETURN
END SUBROUTINE UpdateMeterValues