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.
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 LEEDtariffReporting
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer of GARD Analytics, Inc.
! DATE WRITTEN October 2012
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Write the economic results for LEED reporting
! METHODOLOGY EMPLOYED:
! REFERENCES:
! na
! USE STATEMENTS:
USE OutputReportPredefined
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
INTEGER, EXTERNAL :: GetMeterIndex !an exteral subroutine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: elecFacilMeter
INTEGER :: gasFacilMeter
REAL(r64) :: elecTotalEne
REAL(r64) :: gasTotalEne
REAL(r64) :: otherTotalEne
REAL(r64) :: elecTotalCost
REAL(r64) :: gasTotalCost
REAL(r64) :: otherTotalCost
REAL(r64) :: allTotalCost
CHARACTER(len=MaxNameLength) :: elecTariffNames
CHARACTER(len=MaxNameLength) :: gasTariffNames
CHARACTER(len=MaxNameLength) :: othrTariffNames
INTEGER :: elecUnits
INTEGER :: gasUnits
INTEGER :: othrUnits
INTEGER :: gasDemWindowUnits
INTEGER :: othrDemWindowUnits
INTEGER :: iTariff
IF (numTariff .GT. 0) THEN
elecFacilMeter = GetMeterIndex('ELECTRICITY:FACILITY')
gasFacilMeter = GetMeterIndex('GAS:FACILITY')
elecTotalEne = 0.0d0
gasTotalEne = 0.0d0
otherTotalEne = 0.0d0
elecTotalCost = 0.0d0
gasTotalCost = 0.0d0
otherTotalCost = 0.0d0
allTotalCost = 0.0d0
elecUnits = 0
gasUnits = 0
othrUnits = 0
gasDemWindowUnits = 0
othrDemWindowUnits = 0
elecTariffNames = ''
gasTariffNames = ''
othrTariffNames = ''
DO iTariff = 1, numTariff
IF (tariff(iTariff)%isSelected) THEN
allTotalCost = allTotalCost + tariff(iTariff)%totalAnnualCost
IF (tariff(iTariff)%kindElectricMtr .GE. kindMeterElecSimple) THEN
IF (tariff(iTariff)%totalAnnualEnergy .GT. elecTotalEne) elecTotalEne = tariff(iTariff)%totalAnnualEnergy
elecTotalCost = elecTotalCost + tariff(iTariff)%totalAnnualCost
elecTariffNames = TRIM(elecTariffNames) // ' ' // tariff(iTariff)%tariffName
elecUnits = tariff(iTariff)%convChoice
ELSE IF (tariff(iTariff)%reportMeterIndx .EQ. gasFacilMeter) THEN
IF (tariff(iTariff)%totalAnnualEnergy .GT. gasTotalEne) gasTotalEne = tariff(iTariff)%totalAnnualEnergy
gasTotalCost = gasTotalCost + tariff(iTariff)%totalAnnualCost
gasTariffNames = TRIM(gasTariffNames) // ' ' // tariff(iTariff)%tariffName
gasUnits = tariff(iTariff)%convChoice
gasDemWindowUnits = tariff(iTariff)%demandWindow
ELSE
IF (tariff(iTariff)%totalAnnualEnergy .GT. otherTotalEne) otherTotalEne = tariff(iTariff)%totalAnnualEnergy
otherTotalCost = otherTotalCost + tariff(iTariff)%totalAnnualCost
othrTariffNames = TRIM(othrTariffNames) // ' ' // tariff(iTariff)%tariffName
othrUnits = tariff(iTariff)%convChoice
othrDemWindowUnits = tariff(iTariff)%demandWindow
END IF
END IF
END DO
!names of the rates
CALL PreDefTableEntry(pdchLeedEtsRtNm,'Electricity',elecTariffNames)
CALL PreDefTableEntry(pdchLeedEtsRtNm,'Natural Gas',gasTariffNames)
CALL PreDefTableEntry(pdchLeedEtsRtNm,'Other',othrTariffNames)
!virtual rate
IF (elecTotalEne .NE. 0) CALL PreDefTableEntry(pdchLeedEtsVirt,'Electricity',elecTotalCost/elecTotalEne,3)
IF (gasTotalEne .NE. 0) CALL PreDefTableEntry(pdchLeedEtsVirt,'Natural Gas',gasTotalCost/gasTotalEne,3)
IF (otherTotalEne .NE. 0) CALL PreDefTableEntry(pdchLeedEtsVirt,'Other',otherTotalCost/otherTotalEne,3)
!units
CALL PreDefTableEntry(pdchLeedEtsEneUnt,'Electricity',convEneStrings(elecUnits))
CALL PreDefTableEntry(pdchLeedEtsEneUnt,'Natural Gas',convEneStrings(gasUnits))
CALL PreDefTableEntry(pdchLeedEtsEneUnt,'Other',convEneStrings(othrUnits))
CALL PreDefTableEntry(pdchLeedEtsDemUnt,'Electricity',convDemStrings(elecUnits))
CALL PreDefTableEntry(pdchLeedEtsDemUnt,'Natural Gas',TRIM(convDemStrings(gasUnits)) // TRIM(demWindowStrings(gasDemWindowUnits)))
CALL PreDefTableEntry(pdchLeedEtsDemUnt,'Other',TRIM(convDemStrings(othrUnits)) // TRIM(demWindowStrings(othrDemWindowUnits)))
! total cost
CALL PreDefTableEntry(pdchLeedEcsTotal,'Electricity',elecTotalCost,2)
CALL PreDefTableEntry(pdchLeedEcsTotal,'Natural Gas',gasTotalCost,2)
CALL PreDefTableEntry(pdchLeedEcsTotal,'Other',otherTotalCost,2)
! save the total costs for later to compute process fraction
LEEDelecCostTotal = elecTotalCost
LEEDgasCostTotal = gasTotalCost
LEEDothrCostTotal = otherTotalCost
CALL PreDefTableEntry(pdchLeedEcsTotal,'Total',elecTotalCost + gasTotalCost + otherTotalCost,2)
END IF
END SUBROUTINE LEEDtariffReporting