SUBROUTINE GetPVTThermalPowerProduction(PVindex, ThermalPower, ThermalEnergy)
! SUBROUTINE INFORMATION:
! AUTHOR <author>
! DATE WRITTEN <date_written>
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: PVindex ! index of PV generator (not PVT collector)
REAL(r64), INTENT(OUT) :: ThermalPower
REAL(r64), INTENT(OUT) :: ThermalEnergy
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PVTnum = 0
INTEGER :: Loop = 0
! first find PVT index that is associated with this PV generator
DO loop = 1, NumPVT
IF (.not. PVT(loop)%PVfound) CYCLE
IF (PVT(loop)%PVnum == PVindex) THEN ! we found it
PVTnum = loop
ENDIF
ENDDO
IF (PVTnum > 0) THEN
ThermalPower = PVT(PVTnum)%report%ThermPower
ThermalEnergy = PVT(PVTnum)%report%ThermEnergy
ELSE
ThermalPower = 0.0D0
ThermalEnergy = 0.0D0
ENDIF
RETURN
END SUBROUTINE GetPVTThermalPowerProduction