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.
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 GetHumidifierInput
          ! SUBROUTINE INFORMATION:
          !       AUTHOR         Fred Buhl
          !       DATE WRITTEN   September 2000
          !       MODIFIED       na
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          ! Obtains input data for humidifiers and stores it in humidifier data structures.
          ! METHODOLOGY EMPLOYED:
          ! Uses InputProcessor "Get" routines to obtain data.
          ! REFERENCES:
          ! na
          ! USE STATEMENTS:
  USE InputProcessor,        ONLY: GetNumObjectsFound, GetObjectItem, VerifyName, GetObjectDefMaxArgs
  USE NodeInputManager,      ONLY: GetOnlySingleNode
  USE BranchNodeConnections, ONLY: TestCompSet
  USE WaterManager         , ONLY: SetupTankDemandComponent
  USE DataIPShortCuts
  IMPLICIT NONE    ! Enforce explicit typing of all variables in this routine
          ! SUBROUTINE ARGUMENT DEFINITIONS:
          ! na
          ! SUBROUTINE PARAMETER DEFINITIONS:
  CHARACTER(len=*), PARAMETER :: RoutineName='GetHumidifierInputs: ' ! include trailing blank space
          ! INTERFACE BLOCK SPECIFICATIONS
          ! na
          ! DERIVED TYPE DEFINITIONS
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  INTEGER       :: HumidifierIndex ! loop index
  INTEGER       :: HumNum          ! current humidifier number
  INTEGER       :: NumAlphas       ! Number of Alphas for each GetObjectItem call
  INTEGER       :: NumNumbers      ! Number of Numbers for each GetObjectItem call
  INTEGER       :: IOStatus        ! Used in GetObjectItem
  LOGICAL       :: ErrorsFound=.FALSE.  ! Set to true if errors in input, fatal at end of routine
  LOGICAL       :: IsNotOK         ! Flag to verify name
  LOGICAL       :: IsBlank         ! Flag for blank name
  CHARACTER (len=MaxNameLength)  :: CurrentModuleObject     ! for ease in getting objects
  CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Alphas         ! Alpha input items for object
  CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields   ! Alpha field names
  CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
  REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers           ! Numeric input items for object
  LOGICAL, ALLOCATABLE, DIMENSION(:)   :: lAlphaBlanks      ! Logical array, alpha field input BLANK = .true.
  LOGICAL, ALLOCATABLE, DIMENSION(:)   :: lNumericBlanks    ! Logical array, numeric field input BLANK = .true.
  INTEGER                              :: TotalArgs=0       ! Total number of alpha and numeric arguments (max) for a
                                                            !  certain object in the input file
  CurrentModuleObject='Humidifier:Steam:Electric'
  NumElecSteamHums = GetNumObjectsFound(CurrentModuleObject)
  NumHumidifiers = NumElecSteamHums
  ! allocate the data array
  ALLOCATE(Humidifier(NumHumidifiers))
  ALLOCATE(CheckEquipName(NumHumidifiers))
  CheckEquipName=.true.
  CALL GetObjectDefMaxArgs(CurrentModuleObject,TotalArgs,NumAlphas,NumNumbers)
  ALLOCATE(Alphas(NumAlphas))
  Alphas=' '
  ALLOCATE(cAlphaFields(NumAlphas))
  cAlphaFields=' '
  ALLOCATE(cNumericFields(NumNumbers))
  cNumericFields=' '
  ALLOCATE(Numbers(NumNumbers))
  Numbers=0.0d0
  ALLOCATE(lAlphaBlanks(NumAlphas))
  lAlphaBlanks=.true.
  ALLOCATE(lNumericBlanks(NumNumbers))
  lNumericBlanks=.true.
  ! loop over electric steam humidifiers and load the input data
  DO HumidifierIndex = 1,NumElecSteamHums
    CALL GetObjectItem(CurrentModuleObject,HumidifierIndex,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
                       NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
                       AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
    HumNum = HumidifierIndex
    IsNotOK=.FALSE.
    IsBlank=.FALSE.
    CALL VerifyName(Alphas(1),Humidifier%Name,HumNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
    IF (IsNotOK) THEN
      ErrorsFound=.TRUE.
      IF (IsBlank) Alphas(1)='xxxxx'
    ENDIF
    Humidifier(HumNum)%Name     = Alphas(1)
!    Humidifier(HumNum)%HumType  = TRIM(CurrentModuleObject)
    Humidifier(HumNum)%HumType_Code = Humidifier_Steam_Electric
    Humidifier(HumNum)%Sched    = Alphas(2)
    IF (lAlphaBlanks(2)) THEN
      Humidifier(HumNum)%SchedPtr = ScheduleAlwaysOn
    ELSE
      Humidifier(HumNum)%SchedPtr = GetScheduleIndex(Alphas(2))  ! convert schedule name to pointer
      IF (Humidifier(HumNum)%SchedPtr .EQ. 0) THEN
        CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//': invalid '//TRIM(cAlphaFields(2))//  &
           ' entered ='//TRIM(Alphas(2))// &
           ' for '//TRIM(cAlphaFields(1))//'='//TRIM(Alphas(1)))
        ErrorsFound=.TRUE.
      END IF
    END IF
    Humidifier(HumNum)%NomCapVol    = Numbers(1)
    Humidifier(HumNum)%NomPower     = Numbers(2)
    Humidifier(HumNum)%FanPower     = Numbers(3)
    Humidifier(HumNum)%StandbyPower = Numbers(4)
    Humidifier(HumNum)%AirInNode = &
               GetOnlySingleNode(Alphas(3),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
               NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent)
    Humidifier(HumNum)%AirOutNode = &
               GetOnlySingleNode(Alphas(4),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
               NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
    CALL TestCompSet(trim(CurrentModuleObject),Alphas(1),Alphas(3),Alphas(4),'Air Nodes')
    !  A5; \field Name of Water Storage Tank
    IF (lAlphaBlanks(5)) THEN
      Humidifier(HumNum)%SuppliedByWaterSystem = .FALSE.
    ELSE ! water from storage tank
      !
      Call SetupTankDemandComponent(Alphas(1),TRIM(CurrentModuleObject), Alphas(5), ErrorsFound, &
                              Humidifier(HumNum)%WaterTankID, Humidifier(HumNum)%WaterTankDemandARRID)
      Humidifier(HumNum)%SuppliedByWaterSystem = .TRUE.
    ENDIF
  END DO
  DO HumNum=1,NumHumidifiers
    ! Setup Report variables for the Humidifiers
    IF (Humidifier(HumNum)%SuppliedByWaterSystem) THEN
      CALL SetupOutputVariable('Humidifier Water Volume Flow Rate [m3/s]',Humidifier(HumNum)%WaterConsRate, &
                             'System','Average',Humidifier(HumNum)%Name)
      CALL SetupOutputVariable('Humidifier Water Volume [m3]',Humidifier(HumNum)%WaterCons, &
                             'System','Sum',Humidifier(HumNum)%Name)
      CALL SetupOutputVariable('Humidifier Storage Tank Water Volume Flow Rate [m3/s]',Humidifier(HumNum)%TankSupplyVdot , &
                             'System','Average',Humidifier(HumNum)%Name)
      CALL SetupOutputVariable('Humidifier Storage Tank Water Volume [m3]',Humidifier(HumNum)%TankSupplyVol , &
                             'System','Sum',Humidifier(HumNum)%Name, &
                             ResourceTypekey='Water', EndUseKey='HUMIDIFIER', GroupKey = 'SYSTEM')
      CALL SetupOutputVariable('Humidifier Starved Storage Tank Water Volume Flow Rate [m3/s]',  &
                             Humidifier(HumNum)%StarvedSupplyVdot , &
                             'System','Average',Humidifier(HumNum)%Name)
      CALL SetupOutputVariable('Humidifier Starved Storage Tank Water Volume [m3]',Humidifier(HumNum)%StarvedSupplyVol , &
                             'System','Sum',Humidifier(HumNum)%Name, &
                             ResourceTypeKey='Water', EndUseKey='HUMIDIFIER', GroupKey = 'SYSTEM')
      CALL SetupOutputVariable('Humidifier Mains Water Volume [m3]',Humidifier(HumNum)%StarvedSupplyVol , &
                             'System','Sum',Humidifier(HumNum)%Name, &
                             ResourceTypeKey='MainsWater', EndUseKey='HUMIDIFIER', GroupKey = 'SYSTEM')
    ELSE
      CALL SetupOutputVariable('Humidifier Water Volume Flow Rate [m3/s]',Humidifier(HumNum)%WaterConsRate, &
                             'System','Average',Humidifier(HumNum)%Name)
      CALL SetupOutputVariable('Humidifier Water Volume [m3]',Humidifier(HumNum)%WaterCons, &
                             'System','Sum',Humidifier(HumNum)%Name, &
                             ResourceTypeKey='WATER',EndUseKey = 'HUMIDIFIER',GroupKey = 'System')
      CALL SetupOutputVariable('Humidifier Mains Water Volume [m3]',Humidifier(HumNum)%WaterCons, &
                             'System','Sum',Humidifier(HumNum)%Name, &
                             ResourceTypeKey='MAINSWATER',EndUseKey = 'HUMIDIFIER',GroupKey = 'System')
    ENDIF
    CALL SetupOutputVariable('Humidifier Electric Power [W]',Humidifier(HumNum)%ElecUseRate,&
                             'System','Average',Humidifier(HumNum)%Name)
    CALL SetupOutputVariable('Humidifier Electric Energy [J]',Humidifier(HumNum)%ElecUseEnergy,&
                             'System','Sum',Humidifier(HumNum)%Name, &
                             ResourceTypeKey='ELECTRICITY',EndUseKey = 'HUMIDIFIER',GroupKey = 'System')
  END DO
  DEALLOCATE(Alphas)
  DEALLOCATE(cAlphaFields)
  DEALLOCATE(cNumericFields)
  DEALLOCATE(Numbers)
  DEALLOCATE(lAlphaBlanks)
  DEALLOCATE(lNumericBlanks)
  IF (ErrorsFound) THEN
    CALL ShowFatalError(RoutineName//'Errors found in input.')
  END IF
  RETURN
END SUBROUTINE GetHumidifierInput