SUBROUTINE GetMonthlyCostForResource(inResourceNumber,outMonthlyCosts)
! FUNCTION INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN May 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Return the total annual cost for a given resource number.
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: inResourceNumber
REAL(r64), INTENT(OUT),DIMENSION(12) :: outMonthlyCosts
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: iTariff
INTEGER :: jMonth
INTEGER :: totalVarPt
outMonthlyCosts = 0.0d0
DO iTariff = 1, numTariff
IF (Tariff(iTariff)%isSelected) THEN
IF (Tariff(iTariff)%resourceNum .EQ. inResourceNumber) THEN
totalVarPt = tariff(iTariff)%ptTotal
DO jMonth = 1,12 !use 12 because LCC assume 12 months
outMonthlyCosts(jMonth) = outMonthlyCosts(jMonth) + econVar(totalVarPt)%values(jMonth)
END DO
END IF
END IF
END DO
END SUBROUTINE GetMonthlyCostForResource