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 | ||
---|---|---|---|---|---|---|
character(len=*) | :: | ReportFreqName |
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 InitPollutionMeterReporting(ReportFreqName)
! SUBROUTINE INFORMATION:Richard Liesen
! DATE WRITTEN July 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is called at the end of the first HVAC iteration and
! sets up the reporting for the Pollution Meters.
! ReportPollutionOutput,
! A1 ; \field Reporting_Frequency
! \type choice
! \key timestep
! \key hourly
! \key daily
! \key monthly
! \key runperiod
!
! METHODOLOGY EMPLOYED:
! The program tries to setup all of the following meters if the Pollution Report is initiated.
! Electricity:Facility [J]
! Diesel:Facility [J]
! DistrictCooling:Facility [J]
! DistrictHeating:Facility [J]
! Gas:Facility [J]
! GASOLINE:Facility [J]
! COAL:Facility [J]
! FuelOil#1:Facility [J]
! FuelOil#2:Facility [J]
! Propane:Facility [J]
! ElectricityProduced:Facility [J]
! Pollutant:CO2
! Pollutant:CO
! Pollutant:CH4
! Pollutant:NOx
! Pollutant:N2O
! Pollutant:SO2
! Pollutant:PM
! Pollutant:PM10
! Pollutant:PM2.5
! Pollutant:NH3
! Pollutant:NMVOC
! Pollutant:Hg
! Pollutant:Pb
! Pollutant:WaterEnvironmentalFactors
! Pollutant:Nuclear High
! Pollutant:Nuclear Low
! Pollutant:Carbon Equivalent
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPrecisionGlobals
USE InputProcessor, ONLY: FindItem
USE OutputProcessor
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*) :: ReportFreqName
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER, DIMENSION(1:29) :: PollutionMeters = &
(/'Electricity:Facility ', &
'Diesel:Facility ', &
'DistrictCooling:Facility ', &
'DistrictHeating:Facility ', &
'Gas:Facility ', &
'GASOLINE:Facility ', &
'COAL:Facility ', &
'FuelOil#1:Facility ', &
'FuelOil#2:Facility ', &
'Propane:Facility ', &
'ElectricityProduced:Facility ', &
'Steam:Facility ', &
! Now for the Pollution Meters
'CO2:Facility ', &
'CO:Facility ', &
'CH4:Facility ', &
'NOx:Facility ', &
'N2O:Facility ', &
'SO2:Facility ', &
'PM:Facility ', &
'PM10:Facility ', &
'PM2.5:Facility ', &
'NH3:Facility ', &
'NMVOC:Facility ', &
'Hg:Facility ', &
'Pb:Facility ', &
'WaterEnvironmentalFactors:Facility ', &
'Nuclear High:Facility ', &
'Nuclear Low:Facility ', &
'Carbon Equivalent:Facility '/)
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER Loop
INTEGER NumReqMeters
INTEGER Meter
INTEGER ReportFreq
INTEGER :: indexGroupKey
CHARACTER(len=MaxNameLength) :: indexGroup
NumReqMeters = 29
CALL DetermineFrequency(ReportFreqName,ReportFreq)
DO Loop=1,NumReqMeters
Meter = FindItem(PollutionMeters(Loop),EnergyMeters%Name,NumEnergyMeters)
If (Meter > 0) Then !All the active meters for this run are set, but all are still searched for.
indexGroupKey = DetermineIndexGroupKeyFromMeterName (EnergyMeters(Meter)%Name)
indexGroup = DetermineIndexGroupFromMeterGroup (EnergyMeters(Meter))
!All of the specified meters are checked and the headers printed to the meter file if this
! has not been done previously
SELECT CASE (ReportFreq)
CASE (ReportTimeStep)
If(EnergyMeters(Meter)%RptTS) Then
EnergyMeters(Meter)%RptTS=.true.
Else
EnergyMeters(Meter)%RptTS=.true.
CALL WriteMeterDictionaryItem (ReportFreq, SummedVar, EnergyMeters(Meter)%TSRptNum, &
indexGroupKey, indexGroup, EnergyMeters(Meter)%TSRptNumChr, EnergyMeters(Meter)%Name, &
EnergyMeters(Meter)%Units, .false., .false.)
End If
CASE (ReportHourly)
If(EnergyMeters(Meter)%RptHR) Then
EnergyMeters(Meter)%RptHR=.true.
TrackingHourlyVariables=.true.
Else
EnergyMeters(Meter)%RptHR=.true.
TrackingHourlyVariables=.true.
CALL WriteMeterDictionaryItem (ReportFreq, SummedVar, EnergyMeters(Meter)%HRRptNum, &
indexGroupKey, indexGroup, EnergyMeters(Meter)%HRRptNumChr, EnergyMeters(Meter)%Name, &
EnergyMeters(Meter)%Units, .false., .false.)
End If
CASE (ReportDaily)
If(EnergyMeters(Meter)%RptDY) Then
EnergyMeters(Meter)%RptDY=.true.
TrackingDailyVariables=.true.
Else
EnergyMeters(Meter)%RptDY=.true.
TrackingDailyVariables=.true.
CALL WriteMeterDictionaryItem (ReportFreq, SummedVar, EnergyMeters(Meter)%DYRptNum, &
indexGroupKey, indexGroup, EnergyMeters(Meter)%DYRptNumChr, EnergyMeters(Meter)%Name, &
EnergyMeters(Meter)%Units, .false., .false.)
End If
CASE (ReportMonthly)
If(EnergyMeters(Meter)%RptMN) Then
EnergyMeters(Meter)%RptMN=.true.
TrackingMonthlyVariables=.true.
Else
EnergyMeters(Meter)%RptMN=.true.
TrackingMonthlyVariables=.true.
CALL WriteMeterDictionaryItem (ReportFreq, SummedVar, EnergyMeters(Meter)%MNRptNum, &
indexGroupKey, indexGroup, EnergyMeters(Meter)%MNRptNumChr, EnergyMeters(Meter)%Name, &
EnergyMeters(Meter)%Units, .false., .false.)
End If
CASE (ReportSim)
If(EnergyMeters(Meter)%RptSM) Then
EnergyMeters(Meter)%RptSM=.true.
TrackingRunPeriodVariables=.true.
Else
EnergyMeters(Meter)%RptSM=.true.
TrackingRunPeriodVariables=.true.
CALL WriteMeterDictionaryItem (ReportFreq, SummedVar, EnergyMeters(Meter)%SMRptNum, &
indexGroupKey, indexGroup, EnergyMeters(Meter)%SMRptNumChr, EnergyMeters(Meter)%Name, &
EnergyMeters(Meter)%Units, .false., .false.)
End If
CASE DEFAULT
END SELECT
End If
ENDDO
RETURN
END SUBROUTINE InitPollutionMeterReporting