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) | :: | VarName | |||
character(len=*), | intent(in) | :: | VarKeyName | |||
integer, | intent(out) | :: | VarType | |||
integer, | intent(out) | :: | VarIndex |
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 GetVariableTypeAndIndex(VarName, VarKeyName, VarType, VarIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN June 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! local helper routine intended to lookup report variables only.
! Use GetMeterIndex for meters.
! METHODOLOGY EMPLOYED:
! make calls to OutputProcessor methods GetVariableKeyCountandType and GetVariableKeys
! USE STATEMENTS:
USE RuntimeLanguageProcessor, ONLY: EvaluateStack
USE DataInterfaces, ONLY:GetVariableKeyCountandType, GetVariableKeys
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: VarName
CHARACTER(len=*), INTENT(IN) :: VarKeyName
INTEGER, INTENT(OUT) :: VarType
INTEGER, INTENT(OUT) :: VarIndex
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumKeys
INTEGER :: KeyNum
INTEGER :: AvgOrSum
INTEGER :: StepType
CHARACTER(len=MaxNameLength) :: Units
CHARACTER(len=MaxNameLength), DIMENSION(:), ALLOCATABLE :: KeyName
INTEGER, DIMENSION(:), ALLOCATABLE :: KeyIndex
LOGICAL :: Found
! FLOW:
VarType = 0
VarIndex = 0
Found = .FALSE.
CALL GetVariableKeyCountandType(VarName, NumKeys, VarType, AvgOrSum, StepType, Units)
! note that schedules are not getting VarType set right...
IF (NumKeys > 0) THEN
ALLOCATE(KeyName(NumKeys))
ALLOCATE(KeyIndex(NumKeys))
CALL GetVariableKeys(VarName, VarType, KeyName, KeyIndex)
IF (KeyName(1) == 'ENVIRONMENT') THEN
VarIndex = KeyIndex(1)
ELSE
DO KeyNum = 1, NumKeys
IF (KeyName(KeyNum) == VarKeyName) THEN
Found = .TRUE.
EXIT
END IF
END DO
IF (Found) VarIndex = KeyIndex(KeyNum)
END IF
DEALLOCATE(KeyName)
DEALLOCATE(KeyIndex)
END IF
RETURN
END SUBROUTINE GetVariableTypeAndIndex