diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.cc b/src/EnergyPlus/InputProcessing/InputProcessor.cc index e32a8518188..2ff29885f71 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.cc +++ b/src/EnergyPlus/InputProcessing/InputProcessor.cc @@ -1638,7 +1638,6 @@ void InputProcessor::preScanReportingVariables() // Output:Variable // Meter:Custom // Meter:CustomDecrement - // Meter:CustomDifference // Output:Table:Monthly // Output:Table:TimeBins // Output:Table:SummaryReports @@ -1649,7 +1648,6 @@ void InputProcessor::preScanReportingVariables() static std::string const OutputVariable("Output:Variable"); static std::string const MeterCustom("Meter:Custom"); static std::string const MeterCustomDecrement("Meter:CustomDecrement"); - // static std::string const MeterCustomDifference( "METER:CUSTOMDIFFERENCE" ); static std::string const OutputTableMonthly("Output:Table:Monthly"); static std::string const OutputTableAnnual("Output:Table:Annual"); static std::string const OutputTableTimeBins("Output:Table:TimeBins"); diff --git a/src/Transition/CreateNewIDFUsingRulesV9_4_0.f90 b/src/Transition/CreateNewIDFUsingRulesV9_4_0.f90 index e3d2a863b98..0cfda818482 100644 --- a/src/Transition/CreateNewIDFUsingRulesV9_4_0.f90 +++ b/src/Transition/CreateNewIDFUsingRulesV9_4_0.f90 @@ -128,6 +128,13 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile LOGICAL :: alreadyProcessedOneOutputDiagnostic=.false. INTEGER :: nE, nEC, nG, nNG, nFO, nFON + LOGICAL :: changeMeterNameFlag + INTEGER :: totMeterCustom = 0 + INTEGER :: totMeterCustomDecr = 0 + INTEGER numMeterCustom + CHARACTER(len=MaxNameLength) :: MeterCustomName + CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: MeterCustomNames + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! E N D O F I N S E R T L O C A L V A R I A B L E S H E R E ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -242,6 +249,8 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ALLOCATE(NwAorN(MaxTotalArgs),NwReqFld(MaxTotalArgs),NwFldNames(MaxTotalArgs),NwFldDefaults(MaxTotalArgs),NwFldUnits(MaxTotalArgs)) ALLOCATE(OutArgs(MaxTotalArgs)) ALLOCATE(DeleteThisRecord(NumIDFRecords)) + ALLOCATE(MeterCustomNames(NumIDFRecords)) + DeleteThisRecord=.false. NoVersion=.true. @@ -291,7 +300,29 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ENDDO CALL DisplayString('Processing IDF -- OutputDiagnostics preprocessing complete.') ENDIF - ! End Pre-process OutputDiagnostics + ! End Pre-process OutputDiagnostics + + !- Pre-process for names of Meter:Custom objects + totMeterCustom = GetNumObjectsFound('METER:CUSTOM') + IF (totMeterCustom > 0) THEN + DO numMeterCustom=1, totMeterCustom + CALL GetObjectItem('METER:CUSTOM', numMeterCustom, Alphas, NumAlphas, Numbers, NumNumbers, Status) + MeterCustomName = MakeUpperCase(TRIM(Alphas(1))) + MeterCustomNames(numMeterCustom) = MeterCustomName + END DO + END IF + !- Ene Pre-process for names of Meter:Custom objects + + !- Pre-process for names of Meter:CustomDecrement objects + totMeterCustomDecr = GetNumObjectsFound('METER:CUSTOMDECREMENT') + IF (totMeterCustomDecr > 0) THEN + DO numMeterCustom=1, totMeterCustomDecr + CALL GetObjectItem('METER:CUSTOMDECREMENT', numMeterCustom, Alphas, NumAlphas, Numbers, NumNumbers, Status) + MeterCustomName = MakeUpperCase(TRIM(Alphas(1))) + MeterCustomNames(numMeterCustom + totMeterCustom) = MeterCustomName + END DO + END IF + !- Ene Pre-process for names of Meter:CustomDecrement objects !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! P R O C E S S I N G ! @@ -604,7 +635,16 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile .false.) IF (DelThis) CYCLE IF (CurArgs .GE. 1) THEN - CALL ReplaceFuelNameWithEndUseSubcategory(OutArgs(1), NoDiff) + changeMeterNameFlag = .true. + DO numMeterCustom=1, totMeterCustom + totMeterCustomDecr + MeterCustomName = MeterCustomNames(numMeterCustom) + IF (MeterCustomName .eq. MakeUPPERCase(InArgs(1))) THEN + changeMeterNameFlag = .false. + END IF + END DO + IF (changeMeterNameFlag) THEN + CALL ReplaceFuelNameWithEndUseSubcategory(OutArgs(1), NoDiff) + END IF END IF CASE('OUTPUT:TABLE:TIMEBINS')