Skip to content

Commit

Permalink
Standardize fuel types - fix transition build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Nov 1, 2019
1 parent 67bef3f commit dbd76a5
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions src/Transition/CreateNewIDFUsingRulesV9_3_0.f90
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 67) THEN
CALL FixFuelTypes(OutArgs(67))
CALL FixFuelTypes(OutArgs(67), NoDiff)
END IF

! If your original object starts with B, insert the rules here
Expand All @@ -415,15 +415,15 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF

CASE('BOILER:STEAM')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF

! If your original object starts with C, insert the rules here
Expand All @@ -433,47 +433,47 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 36) THEN
CALL FixFuelTypes(OutArgs(36))
CALL FixFuelTypes(OutArgs(36), NoDiff)
END IF

CASE('CHILLER:COMBUSTIONTURBINE')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 55) THEN
CALL FixFuelTypes(OutArgs(55))
CALL FixFuelTypes(OutArgs(55), NoDiff)
END IF

CASE('CHILLERHEATER:ABSORPTION:DIRECTFIRED')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 33) THEN
CALL FixFuelTypes(OutArgs(33))
CALL FixFuelTypes(OutArgs(33), NoDiff)
END IF

CASE('COIL:COOLING:DX:MULTISPEED')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 17) THEN
CALL FixFuelTypes(OutArgs(17))
CALL FixFuelTypes(OutArgs(17), NoDiff)
END IF

CASE('COIL:HEATING:FUEL')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 3) THEN
CALL FixFuelTypes(OutArgs(3))
CALL FixFuelTypes(OutArgs(3), NoDiff)
END IF

CASE('COIL:HEATING:DX:MULTISPEED')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 16) THEN
CALL FixFuelTypes(OutArgs(16))
CALL FixFuelTypes(OutArgs(16), NoDiff)
END IF

! If your original object starts with D, insert the rules here
Expand All @@ -485,15 +485,15 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 5) THEN
CALL FixFuelTypes(OutArgs(5))
CALL FixFuelTypes(OutArgs(5), NoDiff)
END IF

CASE('EXTERIOR:FUELEQUIPMENT')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF

! If your original object starts with F, insert the rules here
Expand All @@ -503,7 +503,7 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 1) THEN
CALL FixFuelTypes(OutArgs(1))
CALL FixFuelTypes(OutArgs(1), NoDiff)
! For fuelfactors, the current IDD choice is Propane, so override that here until #5941 is resolved (standardize fuel types)
IF (SameString(OutArgs(1), "PropaneGas")) OutArgs(1) = "Propane"
END IF
Expand All @@ -515,23 +515,23 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 22) THEN
CALL FixFuelTypes(OutArgs(22))
CALL FixFuelTypes(OutArgs(22), NoDiff)
END IF

CASE('GENERATOR:INTERNALCOMBUSTIONENGINE')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 20) THEN
CALL FixFuelTypes(OutArgs(20))
CALL FixFuelTypes(OutArgs(20), NoDiff)
END IF

CASE('GENERATOR:MICROTURBINE')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 12) THEN
CALL FixFuelTypes(OutArgs(12))
CALL FixFuelTypes(OutArgs(12), NoDiff)
END IF

CASE('GLOBALGEOMETRYRULES')
Expand Down Expand Up @@ -617,15 +617,15 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 37) THEN
CALL FixFuelTypes(OutArgs(37))
CALL FixFuelTypes(OutArgs(37), NoDiff)
END IF

CASE('HVACTEMPLATE:PLANT:BOILER')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 5) THEN
CALL FixFuelTypes(OutArgs(5))
CALL FixFuelTypes(OutArgs(5), NoDiff)
END IF

! If your original object starts with I, insert the rules here
Expand All @@ -637,15 +637,15 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF

CASE('LIFECYCLECOST:USEADJUSTMENT')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF

! If your original object starts with M, insert the rules here
Expand All @@ -655,15 +655,15 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! ! FixFuelTypes will set NoDiff = .false. if it makes a change
! OutArgs(1:CurArgs)=InArgs(1:CurArgs)
! IF (CurArgs .GE. 2) THEN
! CALL FixFuelTypes(OutArgs(2))
! CALL FixFuelTypes(OutArgs(2), NoDiff)
! END IF

!CASE('METER:CUSTOMDECREMENT') - resource type cleanup done below along with variable name changes
! CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! ! FixFuelTypes will set NoDiff = .false. if it makes a change
! OutArgs(1:CurArgs)=InArgs(1:CurArgs)
! IF (CurArgs .GE. 2) THEN
! CALL FixFuelTypes(OutArgs(2))
! CALL FixFuelTypes(OutArgs(2), NoDiff)
! END IF

! If your original object starts with N, insert the rules here
Expand All @@ -675,7 +675,7 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF

CASE('OUTPUT:TABLE:SUMMARYREPORTS')
Expand Down Expand Up @@ -716,27 +716,27 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 11) THEN
CALL FixFuelTypes(OutArgs(11))
CALL FixFuelTypes(OutArgs(11), NoDiff)
END IF
IF (CurArgs .GE. 15) THEN
CALL FixFuelTypes(OutArgs(15))
CALL FixFuelTypes(OutArgs(15), NoDiff)
END IF
IF (CurArgs .GE. 18) THEN
CALL FixFuelTypes(OutArgs(18))
CALL FixFuelTypes(OutArgs(18), NoDiff)
END IF

CASE('WATERHEATER:STRATIFIED')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 17) THEN
CALL FixFuelTypes(OutArgs(17))
CALL FixFuelTypes(OutArgs(17), NoDiff)
END IF
IF (CurArgs .GE. 20) THEN
CALL FixFuelTypes(OutArgs(20))
CALL FixFuelTypes(OutArgs(20), NoDiff)
END IF
IF (CurArgs .GE. 24) THEN
CALL FixFuelTypes(OutArgs(24))
CALL FixFuelTypes(OutArgs(24), NoDiff)
END IF

! If your original object starts with Z, insert the rules here
Expand All @@ -745,13 +745,13 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 18) THEN
CALL FixFuelTypes(OutArgs(18))
CALL FixFuelTypes(OutArgs(18), NoDiff)
END IF
IF (CurArgs .GE. 19) THEN
CALL FixFuelTypes(OutArgs(19))
CALL FixFuelTypes(OutArgs(19), NoDiff)
END IF
IF (CurArgs .GE. 20) THEN
CALL FixFuelTypes(OutArgs(20))
CALL FixFuelTypes(OutArgs(20), NoDiff)
END IF


Expand Down Expand Up @@ -977,7 +977,7 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF
! end of Fix resource type
CurVar=4
Expand Down Expand Up @@ -1092,7 +1092,7 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! FixFuelTypes will set NoDiff = .false. if it makes a change
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
IF (CurArgs .GE. 2) THEN
CALL FixFuelTypes(OutArgs(2))
CALL FixFuelTypes(OutArgs(2), NoDiff)
END IF
! end of Fix resource type
CurVar=4 ! In case Source Meter would change
Expand Down Expand Up @@ -1331,57 +1331,57 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile

END SUBROUTINE CreateNewIDFUsingRules

SUBROUTINE FixFuelTypes(InOutArg)
SUBROUTINE FixFuelTypes(InOutArg, NoDiffArg)
USE InputProcessor, ONLY: SameString
CHARACTER(len=*), INTENT(INOUT) :: InOutArg
LOGICAL, INTENT(INOUT) :: NoDiffArg
IF (SameString( InOutArg, 'Electric' )) THEN
InOutArg = 'Electricity'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'Elec' )) THEN
InOutArg = 'Electricity'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'Gas' )) THEN
InOutArg = 'NaturalGas'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'Natural Gas' )) THEN
InOutArg = 'NaturalGas'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'PropaneGas' )) THEN
InOutArg = 'Propane'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'LPG' )) THEN
InOutArg = 'Propane'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'Propane Gas' )) THEN
InOutArg = 'Propane'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'FUELOIL#1' )) THEN
InOutArg = 'FuelOilNo1'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'FUEL OIL #1' )) THEN
InOutArg = 'FuelOilNo1'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'FUEL OIL' )) THEN
InOutArg = 'FuelOilNo1'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'DISTILLATE OIL' )) THEN
InOutArg = 'FuelOilNo1'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'DISTILLATEOIL' )) THEN
InOutArg = 'FuelOilNo1'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'FUELOIL#2' )) THEN
InOutArg = 'FuelOilNo2'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'FUEL OIL #2' )) THEN
InOutArg = 'FuelOilNo2'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'RESIDUAL OIL' )) THEN
InOutArg = 'FuelOilNo2'
NoDiff=.false.
NoDiffArg=.false.
ELSE IF (SameString( InOutArg, 'RESIDUALOIL' )) THEN
InOutArg = 'FuelOilNo2'
NoDiff=.false.
NoDiffArg=.false.
END IF
END SUBROUTINE

6 comments on commit dbd76a5

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoveSynonyms-6601PartB (mjwitte) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoveSynonyms-6601PartB (mjwitte) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoveSynonyms-6601PartB (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2620 of 2624 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: MTD diffs.

Failures:\n

integration Test Summary

  • Passed: 670
  • Failed: 4

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoveSynonyms-6601PartB (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1244 of 1244 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoveSynonyms-6601PartB (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (670 of 674 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 670
  • Failed: 4

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoveSynonyms-6601PartB (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2580 of 2584 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: MTD diffs.

Failures:\n

integration Test Summary

  • Passed: 667
  • Failed: 4

Build Badge Test Badge

Please sign in to comment.