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 | ||
---|---|---|---|---|---|---|
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.
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 GetInputEconomicsVariable(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer of GARD Analytics, Inc.
! DATE WRITTEN May 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Read the input file for "Economics:Variable" objects.
! METHODOLOGY EMPLOYED:
! REFERENCES:
! na
! USE STATEMENTS:
USE DataIPShortCuts
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! true if errors found during getting input objects.
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetInputEconomicsVariable: '
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: numEconVarObj
INTEGER :: tariffPt
INTEGER :: iInObj ! loop index variable for reading in objects
INTEGER :: NumAlphas ! Number of elements in the alpha array
INTEGER :: NumNums ! Number of elements in the numeric array
!CHARACTER(len=MaxNameLength),DIMENSION(100) :: cAlphaArgs !character string data
!REAL(r64), DIMENSION(100) :: rNumericArgs !numeric data
INTEGER :: IOStat ! IO Status when calling get input subroutine
INTEGER :: jVal
INTEGER :: variablePt
INTEGER :: jFld
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! for ease in renaming.
CurrentModuleObject = 'UtilityCost:Variable'
numEconVarObj = GetNumObjectsFound(CurrentModuleObject)
DO iInObj = 1 , numEconVarObj
CALL GetObjectItem(CurrentModuleObject,iInObj,cAlphaArgs,NumAlphas, &
rNumericArgs,NumNums,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
!check to make sure none of the values are another economic object
DO jFld = 1, NumAlphas
IF (INDEX(MakeUpperCase(cAlphaArgs(jFld)),'UTILITYCOST:') .GT. 0) THEN
CALL ShowWarningError(RoutineName//TRIM(CurrentModuleObject)// '="' // TRIM(cAlphaArgs(1)) //'".')
CALL ShowContinueError('... a field was found containing UtilityCost: which may indicate a missing comma.')
END IF
END Do
tariffPt = FindTariffIndex(cAlphaArgs(2),cAlphaArgs(1),ErrorsFound,CurrentModuleObject)
variablePt = AssignVariablePt(cAlphaArgs(1),.TRUE.,varIsArgument,&
varUserDefined,kindVariable,iInObj,tariffPt)
CALL warnIfNativeVarname(cAlphaArgs(1),tariffPt,ErrorsFound,CurrentModuleObject)
!validate the kind of variable - not used internally except for validation
IF (SameString(cAlphaArgs(3),'ENERGY')) THEN
econVar(variablePt)%varUnitType = varUnitTypeEnergy
ELSEIF (SameString(cAlphaArgs(3),'DEMAND')) THEN
econVar(variablePt)%varUnitType = varUnitTypeDemand
ELSEIF (SameString(cAlphaArgs(3),'DIMENSIONLESS')) THEN
econVar(variablePt)%varUnitType = varUnitTypeDimensionless
ELSEIF (SameString(cAlphaArgs(3),'CURRENCY')) THEN
econVar(variablePt)%varUnitType = varUnitTypeCurrency
ELSE
econVar(variablePt)%varUnitType = varUnitTypeDimensionless
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid data')
CALL ShowContinueError('invalid '//trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'".')
ErrorsFound=.true.
END IF
!move number inputs into econVar
DO jVal = 1, NumNums
econVar(variablePt)%values(jVal) = rNumericArgs(jVal)
END DO
! fill the rest of the array with the last value entered
IF (NumNums .LT. MaxNumMonths) THEN
DO jVal = NumNums + 1, MaxNumMonths
econVar(variablePt)%values(jVal) = rNumericArgs(numNums)
END DO
END IF
END DO
END SUBROUTINE GetInputEconomicsVariable