Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | fuelName | |||
logical, | intent(out) | :: | fuelFactorUsed | |||
real(kind=r64), | intent(out) | :: | fuelSourceFactor | |||
logical, | intent(out) | :: | fuelFactorScheduleUsed | |||
integer, | intent(out) | :: | ffScheduleIndex |
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 GetFuelFactorInfo(fuelName,fuelFactorUsed,fuelSourceFactor,fuelFactorScheduleUsed,ffScheduleIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN July 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine allows access to data inside this module from other modules (specifically the
! output tabular reports.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: fuelName ! input fuel name (standard from Tabular reports)
LOGICAL, INTENT(OUT) :: fuelFactorUsed ! return value true if user has entered this fuel
REAL(r64), INTENT(OUT) :: fuelSourceFactor ! if used, the source factor
LOGICAL, INTENT(OUT) :: fuelFactorScheduleUsed ! if true, schedules for this fuel are used
INTEGER, INTENT(OUT) :: ffScheduleIndex ! if schedules for this fuel are used, return schedule index
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
IF (GetInputFlagPollution) THEN
CALL GetPollutionFactorInput
GetInputFlagPollution=.false.
ENDIF
fuelFactorUsed=.false.
fuelSourceFactor=0.0d0
fuelFactorScheduleUsed=.false.
ffScheduleIndex = 0
SELECT CASE(fuelName)
CASE ('NaturalGas', 'Gas')
IF (Pollution%NatGasCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%NatGasCoef%Source
IF (Pollution%NatGasCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%NatGasCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.084d0
ENDIF
CASE ('Electricity')
IF (Pollution%ElecCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%ElecCoef%Source
IF (Pollution%ElecCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%ElecCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 3.167d0
ENDIF
CASE ('ResidualOil', 'FuelOil#2')
IF (Pollution%FuelOil2Coef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%FuelOil2Coef%Source
IF (Pollution%FuelOil2Coef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%FuelOil2Coef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.05d0
ENDIF
CASE ('DistillateOil', 'FuelOil#1')
IF (Pollution%FuelOil1Coef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%FuelOil1Coef%Source
IF (Pollution%FuelOil1Coef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%FuelOil1Coef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.05d0
ENDIF
CASE ('Coal')
IF (Pollution%CoalCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%CoalCoef%Source
IF (Pollution%CoalCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%CoalCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.05d0
ENDIF
CASE ('Gasoline')
IF (Pollution%GasolineCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%GasolineCoef%Source
IF (Pollution%GasolineCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%GasolineCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.05d0
ENDIF
CASE ('Propane')
IF (Pollution%PropaneCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%PropaneCoef%Source
IF (Pollution%PropaneCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%PropaneCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.05d0
ENDIF
CASE ('Diesel')
IF (Pollution%DieselCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%DieselCoef%Source
IF (Pollution%DieselCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%DieselCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.05d0
ENDIF
CASE ('OtherFuel1')
IF (Pollution%OtherFuel1Coef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%OtherFuel1Coef%Source
IF (Pollution%OtherFuel1Coef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%OtherFuel1Coef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.0d0
ENDIF
CASE ('OtherFuel2')
IF (Pollution%OtherFuel2Coef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%OtherFuel2Coef%Source
IF (Pollution%OtherFuel2Coef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%OtherFuel2Coef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.0d0
ENDIF
CASE ('DistrictHeating')
IF (Pollution%NatGasCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%NatGasCoef%Source / Pollution%PurchHeatEffic
IF (Pollution%NatGasCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%NatGasCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 1.084d0 / Pollution%PurchHeatEffic
ENDIF
CASE ('DistrictCooling')
IF (Pollution%ElecCoef%FuelFactorUsed) THEN
fuelFactorUsed=.true.
fuelSourceFactor=Pollution%ElecCoef%Source / Pollution%PurchCoolCOP
IF (Pollution%ElecCoef%SourceSched == 0) THEN
fuelFactorScheduleUsed=.false.
ELSE
fuelFactorScheduleUsed=.true.
ffScheduleIndex = Pollution%ElecCoef%SourceSched
ENDIF
ELSE
fuelSourceFactor = 3.167d0 / Pollution%PurchCoolCOP
ENDIF
CASE ('Steam')
fuelSourceFactor = 0.3d0
CASE DEFAULT
END SELECT
RETURN
END SUBROUTINE GetFuelFactorInfo