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.
!! Basic ResourceType Meters !! Group Meters !! EndUse Meters ! Following if we do EndUse by ResourceType
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | MtrUnits | |||
character(len=*), | intent(inout) | :: | ResourceType | |||
character(len=*), | intent(inout) | :: | EndUse | |||
character(len=*), | intent(inout) | :: | EndUseSub | |||
character(len=*), | intent(inout) | :: | Group | |||
logical, | intent(inout) | :: | ErrorsFound | |||
character(len=*), | intent(in), | optional | :: | ZoneName |
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 ValidateNStandardizeMeterTitles(MtrUnits,ResourceType,EndUse,EndUseSub,Group,ErrorsFound,ZoneName)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN January 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine uses the keys for the Energy Meters given to the SetupOutputVariable routines
! and makes sure they are "standard" as well as creating meters which need to be added as this
! is the first use of that kind of meter designation.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: MakeUPPERCase, FindItem
USE DataHeatBalance, ONLY: Zone
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: MtrUnits ! Units for the meter
CHARACTER(len=*), INTENT(INOUT) :: ResourceType ! Electricity, Gas, etc.
CHARACTER(len=*), INTENT(INOUT) :: EndUse ! End Use Type (Lights, Heating, etc.)
CHARACTER(len=*), INTENT(INOUT) :: EndUseSub ! End Use Sub Type (General Lights, Task Lights, etc.)
CHARACTER(len=*), INTENT(INOUT) :: Group ! Group key (Facility, Zone, Building, etc.)
LOGICAL, INTENT(INOUT) :: ErrorsFound ! True if errors in this call
CHARACTER(len=*), INTENT(IN), OPTIONAL :: ZoneName ! ZoneName when Group=Building
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: Found ! For checking whether meter is already defined
LOGICAL :: LocalErrorsFound
CHARACTER(len=MaxNameLength*2) :: MeterName
LocalErrorsFound=.false.
!!!! Basic ResourceType Meters
CALL GetStandardMeterResourceType(ResourceType,MakeUPPERCase(ResourceType),LocalErrorsFound)
IF (.not. LocalErrorsFound) THEN
IF (NumEnergyMeters > 0) THEN
Found=FindItem(TRIM(ResourceType)//':Facility',EnergyMeters%Name,NumEnergyMeters)
ELSE
Found=0
ENDIF
IF (Found == 0) CALL AddMeter(TRIM(ResourceType)//':Facility',MtrUnits,ResourceType,' ',' ',' ')
ENDIF
!!!! Group Meters
SELECT CASE (MakeUPPERCase(Group))
CASE (BlankString)
CASE ('BUILDING')
Group='Building'
CASE ('HVAC','SYSTEM')
Group='HVAC'
CASE ('PLANT')
Group='Plant'
CASE DEFAULT
CALL ShowSevereError('Illegal Group (for Meters) Entered='//TRIM(Group))
LocalErrorsFound=.true.
END SELECT
IF (.not. LocalErrorsFound .and. Group /= BlankString) THEN
Found=FindItem(TRIM(ResourceType)//':'//TRIM(Group),EnergyMeters%Name,NumEnergyMeters)
IF (Found == 0) CALL AddMeter(TRIM(ResourceType)//':'//TRIM(Group),MtrUnits,ResourceType,' ',' ',Group)
IF (Group == 'Building') THEN
Found=FindItem(TRIM(ResourceType)//':Zone:'//TRIM(ZoneName),EnergyMeters%Name,NumEnergyMeters)
IF (Found == 0) THEN
CALL AddMeter(TRIM(ResourceType)//':Zone:'//TRIM(ZoneName),MtrUnits,ResourceType,' ',' ','Zone')
ENDIF
ENDIF
ENDIF
!!!! EndUse Meters
SELECT CASE (MakeUPPERCase(EndUse))
CASE (BlankString)
CASE ('INTERIOR LIGHTS','INTERIORLIGHTS')
EndUse='InteriorLights'
CASE ('EXTERIOR LIGHTS','EXTERIORLIGHTS')
EndUse='ExteriorLights'
CASE ('HEATING','HTG')
EndUse='Heating'
CASE ('HEATPRODUCED')
EndUse='HeatProduced'
CASE ('COOLING','CLG')
EndUse='Cooling'
CASE ('DOMESTICHOTWATER','DHW','DOMESTIC HOT WATER')
EndUse='WaterSystems'
CASE ('COGEN','COGENERATION')
EndUse='Cogeneration'
CASE ('INTERIOREQUIPMENT','INTERIOR EQUIPMENT')
EndUse='InteriorEquipment'
CASE ('EXTERIOREQUIPMENT','EXTERIOR EQUIPMENT','EXT EQ','EXTERIOREQ')
EndUse='ExteriorEquipment'
CASE ('EXTERIOR:WATEREQUIPMENT')
EndUse='ExteriorEquipment'
CASE ('PURCHASEDHOTWATER','DISTRICTHOTWATER','PURCHASED HEATING')
EndUse='DistrictHotWater'
CASE ('PURCHASEDCOLDWATER','DISTRICTCHILLEDWATER','PURCHASEDCHILLEDWATER','PURCHASED COLD WATER','PURCHASED COOLING')
EndUse='DistrictChilledWater'
CASE ('FANS','FAN')
EndUse='Fans'
CASE ('HEATINGCOILS','HEATINGCOIL','HEATING COILS','HEATING COIL')
EndUse='HeatingCoils'
CASE ('COOLINGCOILS','COOLINGCOIL','COOLING COILS','COOLING COIL')
EndUse='CoolingCoils'
CASE ('PUMPS','PUMP')
EndUse='Pumps'
CASE ('FREECOOLING','FREE COOLING')
EndUse='Freecooling'
CASE ('LOOPTOLOOP')
EndUse='LoopToLoop'
CASE ('CHILLERS','CHILLER')
EndUse='Chillers'
CASE ('BOILERS','BOILER')
EndUse='Boilers'
CASE ('BASEBOARD','BASEBOARDS')
EndUse='Baseboard'
CASE ('HEATREJECTION','HEAT REJECTION')
EndUse='HeatRejection'
CASE ('HUMIDIFIER','HUMIDIFIERS')
EndUse='Humidifier'
CASE ('HEATRECOVERY','HEAT RECOVERY')
EndUse='HeatRecovery'
CASE ('PHOTOVOLTAICS','PV','PHOTOVOLTAIC')
EndUse='Photovoltaic'
CASE ('WINDTURBINES','WT','WINDTURBINE')
EndUse='WindTurbine'
CASE ('HEAT RECOVERY FOR COOLING','HEATRECOVERYFORCOOLING','HEATRECOVERYCOOLING')
EndUse='HeatRecoveryForCooling'
CASE ('HEAT RECOVERY FOR HEATING','HEATRECOVERYFORHEATING','HEATRECOVERYHEATING')
EndUse='HeatRecoveryForHeating'
CASE ('ELECTRICEMISSIONS')
EndUse='ElectricEmissions'
CASE ('PURCHASEDELECTRICEMISSIONS')
EndUse='PurchasedElectricEmissions'
CASE ('SOLDELECTRICEMISSIONS')
EndUse='SoldElectricEmissions'
CASE ('NATURALGASEMISSIONS')
EndUse='NaturalGasEmissions'
CASE ('FUELOIL#1EMISSIONS')
EndUse='FuelOil#1Emissions'
CASE ('FUELOIL#2EMISSIONS')
EndUse='FuelOil#2Emissions'
CASE ('COALEMISSIONS')
EndUse='CoalEmissions'
CASE ('GASOLINEEMISSIONS')
EndUse='GasolineEmissions'
CASE ('PROPANEEMISSIONS')
EndUse='PropaneEmissions'
CASE ('DIESELEMISSIONS')
EndUse='DieselEmissions'
CASE ('OTHERFUEL1EMISSIONS')
EndUse='OtherFuel1Emissions'
CASE ('OTHERFUEL2EMISSIONS')
EndUse='OtherFuel2Emissions'
CASE ('CARBONEQUIVALENTEMISSIONS')
EndUse='CarbonEquivalentEmissions'
CASE ('REFRIGERATION')
EndUse='Refrigeration'
CASE ('COLDSTORAGECHARGE')
EndUse='ColdStorageCharge'
CASE ('COLDSTORAGEDISCHARGE')
EndUse='ColdStorageDischarge'
CASE ('WATERSYSTEMS' , 'WATERSYSTEM', 'Water System')
EndUse='WaterSystems'
CASE ('RAINWATER')
EndUse = 'Rainwater'
Case ('CONDENSATE')
EndUse = 'Condensate'
Case ('WELLWATER')
EndUse = 'Wellwater'
Case ('MAINSWATER', 'PURCHASEDWATER')
EndUse = 'MainsWater'
CASE DEFAULT
CALL ShowSevereError('Illegal EndUse (for Meters) Entered='//TRIM(EndUse))
LocalErrorsFound=.true.
END SELECT
!!! Following if we do EndUse by ResourceType
IF (.not. LocalErrorsFound .and. EndUse /= BlankString) THEN
Found=FindItem(TRIM(EndUse)//':'//TRIM(ResourceType),EnergyMeters%Name,NumEnergyMeters)
IF (Found == 0) CALL AddMeter(TRIM(EndUse)//':'//TRIM(ResourceType),MtrUnits,ResourceType,EndUse,' ',' ')
IF (Group == 'Building') THEN ! Match to Zone
Found=FindItem(TRIM(EndUse)//':'//TRIM(ResourceType)//':Zone:'//TRIM(ZoneName),EnergyMeters%Name,NumEnergyMeters)
IF (Found == 0) THEN
CALL AddMeter(TRIM(EndUse)//':'//TRIM(ResourceType)//':Zone:'//TRIM(ZoneName),MtrUnits,ResourceType,EndUse,' ','Zone')
ENDIF
ENDIF
ELSEIF (LocalErrorsFound) THEN
ErrorsFound=.true.
ENDIF
! End-Use Subcategories
IF (.not. LocalErrorsFound .and. EndUseSub /= BlankString) THEN
MeterName = TRIM(EndUseSub)//':'//TRIM(EndUse)//':'//TRIM(ResourceType)
Found = FindItem(MeterName,EnergyMeters%Name,NumEnergyMeters)
IF (Found == 0) CALL AddMeter(MeterName,MtrUnits,ResourceType,EndUse,EndUseSub,' ')
ELSEIF (LocalErrorsFound) THEN
ErrorsFound=.true.
ENDIF
RETURN
END SUBROUTINE ValidateNStandardizeMeterTitles