Skip to content

Commit 002f02c

Browse files
committed
Fix #10624 by adding a new function GetFieldOrIDDDefault and using that when retrieving HX effectivenesses
This will effectively set the values to 0.0 if blank, since that's what the IDD default is for these fields.
1 parent 342372b commit 002f02c

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

src/Transition/CreateNewIDFUsingRulesV24_1_0.f90

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,22 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
429429
nodiff=.false.
430430

431431
! read in 8 reference value for the effectiveness at 75% and 100%
432-
HxEffectAt75Airflow(1) = TRIM(InArgs(6)) ! Sensible Effectiveness at 75% Heating Air Flow
433-
HxEffectAt75Airflow(2) = TRIM(InArgs(7)) ! Latent Effectiveness at 75% Heating Air Flow
434-
HxEffectAt75Airflow(3) = TRIM(InArgs(10)) ! Sensible Effectiveness at 75% Cooling Air Flow
435-
HxEffectAt75Airflow(4) = TRIM(InArgs(11)) ! Latent Effectiveness at 75% Cooling Air Flow
436-
HxEffectAt100Airflow(1) = TRIM(InArgs(4)) ! Sensible Effectiveness at 100% Heating Air Flow
437-
HxEffectAt100Airflow(2) = TRIM(InArgs(5)) ! Latent Effectiveness at 100% Heating Air Flow
438-
HxEffectAt100Airflow(3) = TRIM(InArgs(8)) ! Sensible Effectiveness at 100% Cooling Air Flow
439-
HxEffectAt100Airflow(4) = TRIM(InArgs(9)) ! Latent Effectiveness at 100% Cooling Air Flow
432+
! Sensible Effectiveness at 75% Heating Air Flow
433+
HxEffectAt75Airflow(1) = GetFieldOrIDDDefault(InArgs(6), FldDefaults(6))
434+
! Latent Effectiveness at 75% Heating Air Flow
435+
HxEffectAt75Airflow(2) = GetFieldOrIDDDefault(InArgs(7), FldDefaults(7))
436+
! Sensible Effectiveness at 75% Cooling Air Flow
437+
HxEffectAt75Airflow(3) = GetFieldOrIDDDefault(InArgs(10), FldDefaults(10))
438+
! Latent Effectiveness at 75% Cooling Air Flow
439+
HxEffectAt75Airflow(4) = GetFieldOrIDDDefault(InArgs(11), FldDefaults(11))
440+
! Sensible Effectiveness at 100% Heating Air Flow
441+
HxEffectAt100Airflow(1) = GetFieldOrIDDDefault(InArgs(4), FldDefaults(4))
442+
! Latent Effectiveness at 100% Heating Air Flow
443+
HxEffectAt100Airflow(2) = GetFieldOrIDDDefault(InArgs(5), FldDefaults(5))
444+
! Sensible Effectiveness at 100% Cooling Air Flow
445+
HxEffectAt100Airflow(3) = GetFieldOrIDDDefault(InArgs(8), FldDefaults(8))
446+
! Latent Effectiveness at 100% Cooling Air Flow
447+
HxEffectAt100Airflow(4) = GetFieldOrIDDDefault(InArgs(9), FldDefaults(9))
440448

441449
! Remove the 4 fields for 75% airflow and adjust the index of the fields
442450
OutArgs(1:5) = InArgs(1:5)

src/Transition/InputProcessor.f90

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4814,6 +4814,28 @@ FUNCTION IPTrimSigDigits(IntegerValue) RESULT(OutputString)
48144814

48154815
END FUNCTION IPTrimSigDigits
48164816

4817+
FUNCTION GetFieldOrIDDDefault(InArgString, FldDefaultString) RESULT (ResultString)
4818+
4819+
! PURPOSE OF THIS SUBROUTINE:
4820+
! If InArgString is Blank, replace with FldDefaultString
4821+
4822+
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
4823+
4824+
4825+
! FUNCTION ARGUMENT DEFINITIONS:
4826+
CHARACTER(len=*), INTENT(IN) :: InArgString ! Input String
4827+
CHARACTER(len=*), INTENT(IN) :: FldDefaultString ! Default String
4828+
CHARACTER(len=LEN(InArgString)) :: ResultString ! Result String
4829+
4830+
ResultString=InArgString
4831+
IF (ResultString == Blank) THEN
4832+
ResultString = FldDefaultString
4833+
ENDIF
4834+
4835+
RETURN
4836+
4837+
END FUNCTION GetFieldOrIDDDefault
4838+
48174839
! NOTICE
48184840
!
48194841
! Copyright © 1996-2009 The Board of Trustees of the University of Illinois
@@ -4839,4 +4861,3 @@ END FUNCTION IPTrimSigDigits
48394861
!
48404862

48414863
END MODULE InputProcessor
4842-

0 commit comments

Comments
 (0)