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 | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | CodeForIPUnits | |||
character(len=*), | intent(in) | :: | ResourceType | |||
character(len=*), | intent(in) | :: | MtrUnits | |||
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 DetermineMeterIPUnits(CodeForIPUnits,ResourceType,MtrUnits,ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN January 2012
! MODIFIED September 2012; made into subroutine
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! In order to set up tabular reports for IP units, need to search on same strings
! that tabular reports does for IP conversion.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! OutputReportTabular looks for:
! CONSUMP - not used in meters
! ELEC - Electricity (kWH)
! GAS - Gas (therm)
! COOL - Cooling (ton)
! and we need to add WATER (for m3/gal, etc)
! USE STATEMENTS:
USE InputProcessor, ONLY: MakeUPPERCase, SameString
! USE DataGlobals, ONLY: outputfiledebug
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(INOUT) :: CodeForIPUnits ! Output Code for IP Units
CHARACTER(len=*), INTENT(IN) :: ResourceType ! Resource Type
CHARACTER(len=*), INTENT(IN) :: MtrUnits ! Meter units
LOGICAL, INTENT(INOUT) :: ErrorsFound ! true if errors found during subroutine
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=MaxNameLength) :: UC_ResourceType
ErrorsFound=.false.
UC_ResourceType=MakeUPPERCase(ResourceType)
CodeForIPUnits=RT_IPUnits_OtherJ
IF (INDEX(UC_ResourceType,'ELEC') > 0) THEN
CodeForIPUnits=RT_IPUnits_Electricity
ELSEIF (INDEX(UC_ResourceType,'GAS') > 0) THEN
CodeForIPUnits=RT_IPUnits_Gas
ELSEIF (INDEX(UC_ResourceType,'COOL') > 0) THEN
CodeForIPUnits=RT_IPUnits_Cooling
ENDIF
IF (SameString(MtrUnits,'m3') .and. INDEX(UC_ResourceType,'WATER') > 0) THEN
CodeForIPUnits=RT_IPUnits_Water
ELSEIF (SameString(MtrUnits,'m3')) THEN
CodeForIPUnits=RT_IPUnits_OtherM3
ENDIF
IF (SameString(MtrUnits,'kg')) THEN
CodeForIPUnits=RT_IPUnits_OtherKG
ENDIF
IF (SameString(MtrUnits,'L')) THEN
CodeForIPUnits=RT_IPUnits_OtherL
ENDIF
! write(outputfiledebug,*) 'resourcetype=',trim(resourcetype)
! write(outputfiledebug,*) 'ipunits type=',CodeForIPUnits
IF (.not. SameString(MtrUnits,'kg') .and. .not. SameString(MtrUnits,'J') .and. &
.not. SameString(MtrUnits,'m3') .and. .not. SameString(MtrUnits,'L')) THEN
CALL ShowWarningError('DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=['// &
trim(MtrUnits)//'].')
ErrorsFound=.true.
ENDIF
RETURN
END SUBROUTINE DetermineMeterIPUnits