Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip Meter:Custom* Transitions #8297

Merged
merged 3 commits into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/EnergyPlus/InputProcessing/InputProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,6 @@ void InputProcessor::preScanReportingVariables()
// Output:Variable
// Meter:Custom
// Meter:CustomDecrement
// Meter:CustomDifference
// Output:Table:Monthly
// Output:Table:TimeBins
// Output:Table:SummaryReports
Expand All @@ -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");
Expand Down
44 changes: 42 additions & 2 deletions src/Transition/CreateNewIDFUsingRulesV9_4_0.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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 !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 !
Expand Down Expand Up @@ -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')
Expand Down