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 | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | MtrUnits | |||
| integer, | intent(in) | :: | RepVarNum | |||
| integer, | intent(inout) | :: | MeterArrayPtr | |||
| integer, | intent(in) | :: | MeterIndex | |||
| logical, | intent(inout) | :: | ErrorsFound | 
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 AttachCustomMeters(MtrUnits,RepVarNum,MeterArrayPtr,MeterIndex,ErrorsFound)
          ! SUBROUTINE INFORMATION:
          !       AUTHOR         Linda Lawrie
          !       DATE WRITTEN   January 2006
          !       MODIFIED       na
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          ! This subroutine determines which meters this variable will be on (if any),
          ! sets up the meter pointer arrays, and returns a index value to this array which
          ! is stored with the variable.
          ! METHODOLOGY EMPLOYED:
          ! na
          ! REFERENCES:
          ! na
          ! USE STATEMENTS:
  USE InputProcessor, ONLY: FindItem, SameString
  IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
          ! SUBROUTINE ARGUMENT DEFINITIONS:
  CHARACTER(len=*), INTENT(IN)    :: MtrUnits      ! Units for this meter
  INTEGER, INTENT(IN)             :: RepVarNum     ! Number of this report variable
  INTEGER, INTENT(INOUT)          :: MeterArrayPtr ! Input/Output set of Pointers to Meters
  INTEGER, INTENT(IN)             :: MeterIndex    ! Which meter this is
  LOGICAL, INTENT(INOUT)          :: ErrorsFound   ! True if errors in this call
          ! SUBROUTINE PARAMETER DEFINITIONS:
          ! na
          ! INTERFACE BLOCK SPECIFICATIONS:
          ! na
          ! DERIVED TYPE DEFINITIONS:
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  TYPE (MeterArrayType), DIMENSION(:), ALLOCATABLE :: TempMeterArrays
  INTEGER, DIMENSION(:), ALLOCATABLE :: TempOnCustomMeters
  IF (MeterArrayPtr == 0) THEN
    IF (NumVarMeterArrays > 0) THEN
      ALLOCATE(TempMeterArrays(NumVarMeterArrays))
      TempMeterArrays(1:NumVarMeterArrays)=VarMeterArrays
      DEALLOCATE(VarMeterArrays)
    ENDIF
    ALLOCATE(VarMeterArrays(NumVarMeterArrays+1))
    IF (NumVarMeterArrays >0) THEN
      VarMeterArrays(1:NumVarMeterArrays)=TempMeterArrays
      DEALLOCATE(TempMeterArrays)
    ENDIF
    NumVarMeterArrays=NumVarMeterArrays+1
    MeterArrayPtr=NumVarMeterArrays
    VarMeterArrays(NumVarMeterArrays)%NumOnMeters=0
    VarMeterArrays(NumVarMeterArrays)%RepVariable=RepVarNum
    VarMeterArrays(NumVarMeterArrays)%OnMeters=0
    ALLOCATE(VarMeterArrays(NumVarMeterArrays)%OnCustomMeters(1))
    VarMeterArrays(NumVarMeterArrays)%NumOnCustomMeters=1
    VarMeterArrays(NumVarMeterArrays)%OnCustomMeters(VarMeterArrays(NumVarMeterArrays)%NumOnCustomMeters)=MeterIndex
  ELSE
    ! MeterArrayPtr set
    IF (VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters > 0) THEN
      ALLOCATE(TempOnCustomMeters(VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters+1))
      TempOnCustomMeters(1:VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters)=VarMeterArrays(MeterArrayPtr)%OnCustomMeters
      DEALLOCATE(VarMeterArrays(MeterArrayPtr)%OnCustomMeters)
      VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters=VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters+1
      ALLOCATE(VarMeterArrays(MeterArrayPtr)%OnCustomMeters(VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters))
      VarMeterArrays(MeterArrayPtr)%OnCustomMeters=TempOnCustomMeters
      VarMeterArrays(MeterArrayPtr)%OnCustomMeters(VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters)=MeterIndex
      DEALLOCATE(TempOnCustomMeters)
    ELSE
      ALLOCATE(VarMeterArrays(MeterArrayPtr)%OnCustomMeters(1))
      VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters=1
      VarMeterArrays(MeterArrayPtr)%OnCustomMeters(VarMeterArrays(MeterArrayPtr)%NumOnCustomMeters)=MeterIndex
    ENDIF
  ENDIF
  RETURN
END SUBROUTINE AttachCustomMeters