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.
! Errors here are fatal because should only be encountered during development.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | VariableName |
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.
FUNCTION GetVariableUnitsString(VariableName) RESULT(ThisUnitsString)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN October 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function extracts the units from a Variable Name string supplied by
! the developer in the call to SetupOutputVariable(s).
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: VariableName
CHARACTER(len=UnitsStringLength) :: ThisUnitsString
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER lbpos ! position of the left bracket
INTEGER rbpos ! position of the right bracket
! Units are marked with a [
lbpos=INDEX(VariableName,'[',.true.) ! from end of variable name
!!! Errors here are fatal because should only be encountered during development.
ThisUnitsString=BlankString
if (lbpos > 0) then
rbpos=INDEX(VariableName,']',.true.)
if (rbpos == 0 .or. rbpos < lbpos) then
Call ShowFatalError('Ill formed Variable Name Units String, VariableName='//TRIM(VariableName))
ThisUnitsString=VariableName(lbpos:)
else
if ((rbpos-1)-(lbpos+1)+1 > UnitsStringLength) then
Call ShowFatalError('Units String too long for VariableName='//TRIM(VariableName)// &
'; will be truncated to '//TrimSigDigits(UnitsStringLength)//' characters.')
endif
if (lbpos+1 <= rbpos-1) then
ThisUnitsString=VariableName(lbpos+1:rbpos-1)
else
ThisUnitsString=BlankString
endif
endif
endif
RETURN
END FUNCTION GetVariableUnitsString