DataSurfaceColors.f90 Source File

This File Depends On

sourcefile~~datasurfacecolors.f90~~EfferentGraph sourcefile~datasurfacecolors.f90 DataSurfaceColors.f90 sourcefile~dataglobals.f90 DataGlobals.f90 sourcefile~dataglobals.f90->sourcefile~datasurfacecolors.f90 sourcefile~inputprocessor.f90 InputProcessor.f90 sourcefile~dataglobals.f90->sourcefile~inputprocessor.f90 sourcefile~sortandstringutilities.f90 SortAndStringUtilities.f90 sourcefile~dataglobals.f90->sourcefile~sortandstringutilities.f90 sourcefile~dataoutputs.f90 DataOutputs.f90 sourcefile~dataglobals.f90->sourcefile~dataoutputs.f90 sourcefile~dataipshortcuts.f90 DataIPShortCuts.f90 sourcefile~dataglobals.f90->sourcefile~dataipshortcuts.f90 sourcefile~datasizing.f90 DataSizing.f90 sourcefile~dataglobals.f90->sourcefile~datasizing.f90 sourcefile~inputprocessor.f90->sourcefile~datasurfacecolors.f90 sourcefile~datainterfaces.f90 DataInterfaces.f90 sourcefile~datainterfaces.f90->sourcefile~datasurfacecolors.f90 sourcefile~datainterfaces.f90->sourcefile~inputprocessor.f90 sourcefile~dataprecisionglobals.f90 DataPrecisionGlobals.f90 sourcefile~dataprecisionglobals.f90->sourcefile~datasurfacecolors.f90 sourcefile~dataprecisionglobals.f90->sourcefile~dataglobals.f90 sourcefile~dataprecisionglobals.f90->sourcefile~inputprocessor.f90 sourcefile~dataprecisionglobals.f90->sourcefile~datainterfaces.f90 sourcefile~dataprecisionglobals.f90->sourcefile~dataipshortcuts.f90 sourcefile~dataprecisionglobals.f90->sourcefile~datasizing.f90 sourcefile~datasystemvariables.f90 DataSystemVariables.f90 sourcefile~dataprecisionglobals.f90->sourcefile~datasystemvariables.f90 sourcefile~sortandstringutilities.f90->sourcefile~inputprocessor.f90 sourcefile~dataoutputs.f90->sourcefile~inputprocessor.f90 sourcefile~dataipshortcuts.f90->sourcefile~inputprocessor.f90 sourcefile~datasizing.f90->sourcefile~inputprocessor.f90 sourcefile~datastringglobals.f90 DataStringGlobals.f90 sourcefile~datastringglobals.f90->sourcefile~inputprocessor.f90 sourcefile~datastringglobals.f90->sourcefile~datasystemvariables.f90 sourcefile~datasystemvariables.f90->sourcefile~inputprocessor.f90
Help

Files Dependent On This One

sourcefile~~datasurfacecolors.f90~~AfferentGraph sourcefile~datasurfacecolors.f90 DataSurfaceColors.f90 sourcefile~outputreports.f90 OutputReports.f90 sourcefile~datasurfacecolors.f90->sourcefile~outputreports.f90
Help

Source Code


Source Code

MODULE DataSurfaceColors

          ! Module containing the data dealing with the coloring of surfaces for
          ! various outputs (such as DXF)

          ! MODULE INFORMATION:
          !       AUTHOR         Linda Lawrie
          !       DATE WRITTEN   Aug 2007
          !       MODIFIED       na
          !       RE-ENGINEERED  na

          ! PURPOSE OF THIS MODULE:
          ! Contain the data for surface colors and user settings for DXF and possibly
          ! other surface reporting.

          ! METHODOLOGY EMPLOYED:
          ! na

          ! REFERENCES:
          ! na

          ! OTHER NOTES:
          ! na

          ! USE STATEMENTS:
USE DataPrecisionGlobals

IMPLICIT NONE ! Enforce explicit typing of all variables

PUBLIC ! Everything private unless explicitly made public

          ! MODULE PARAMETER DEFINITIONS:
integer, parameter :: NumColors=15
integer, parameter :: ColorNo_Text = 1
integer, parameter :: ColorNo_Wall = 2
integer, parameter :: ColorNo_Window = 3
integer, parameter :: ColorNo_GlassDoor = 4
integer, parameter :: ColorNo_Door = 5
integer, parameter :: ColorNo_Floor = 6
integer, parameter :: ColorNo_Roof = 7
integer, parameter :: ColorNo_ShdDetBldg = 8
integer, parameter :: ColorNo_ShdDetFix = 9
integer, parameter :: ColorNo_ShdAtt = 10
integer, parameter :: ColorNo_PV = 11
integer, parameter :: ColorNo_TDDDome = 12
integer, parameter :: ColorNo_TDDDiffuser = 13
integer, parameter :: ColorNo_DaylSensor1 = 14
integer, parameter :: ColorNo_DaylSensor2 = 15

integer, parameter, dimension(NumColors) :: defaultcolorno=    &
     (/ 3,   & ! text
       43,   & ! wall
      143,   & ! window
      143,   & ! glassdoor
       45,   & ! door
        8,   & ! floor
       15,   & ! roof
      195,   & ! detached building shade (moves with building)
        9,   & ! detached building fixed
       13,   & ! attached building shading
      174,   & ! PV
      143,   & ! TDD:Dome
      143,   & ! TDD:Diffuser
       10,   & ! Daylight Sensor 1
        5/)    ! Daylight Sensor 2

character(len=*), parameter, dimension(NumColors) :: colorkeys=   &
     (/'Text                     ',    &
       'Walls                    ',    &
       'Windows                  ',    &
       'GlassDoors               ',    &
       'Doors                    ',    &
       'Roofs                    ',    &
       'Floors                   ',    &
       'DetachedBuildingShades   ',    &
       'DetachedFixedShades      ',    &
       'AttachedBuildingShades   ',    &
       'Photovoltaics            ',    &
       'TubularDaylightDomes     ',    &
       'TubularDaylightDiffusers ',    &
       'DaylightReferencePoint1  ', &
       'DaylightReferencePoint2  '/)

integer, parameter, dimension(NumColors) :: colorkeyptr=    &
     (/ColorNo_Text,       &
       ColorNo_Wall,       &
       ColorNo_Window,     &
       ColorNo_GlassDoor,  &
       ColorNo_Door,       &
       ColorNo_Floor,      &
       ColorNo_Roof,       &
       ColorNo_ShdDetBldg, &
       ColorNo_ShdDetFix,  &
       ColorNo_ShdAtt,     &
       ColorNo_PV,         &
       ColorNo_TDDDome,    &
       ColorNo_TDDDiffuser,&
       ColorNo_DaylSensor1,&
       ColorNo_DaylSensor2 /)

          ! DERIVED TYPE DEFINITIONS:
          ! na

          ! MODULE VARIABLE DECLARATIONS:
integer, dimension(NumColors) :: DXFcolorno=defaultcolorno

          ! SUBROUTINE SPECIFICATIONS FOR MODULE:

PUBLIC  MatchAndSetColorTextString
PUBLIC  SetUpSchemeColors

CONTAINS

FUNCTION MatchAndSetColorTextString(String,SetValue,ColorType) RESULT(WasSet)

          ! FUNCTION INFORMATION:
          !       AUTHOR         Linda Lawrie
          !       DATE WRITTEN   August 2007
          !       MODIFIED       na
          !       RE-ENGINEERED  na

          ! PURPOSE OF THIS FUNCTION:
          ! <description>

          ! METHODOLOGY EMPLOYED:
          ! <description>

          ! REFERENCES:
          ! na

          ! USE STATEMENTS:
  USE InputProcessor, ONLY: FindItem ! case insensitive Find

  IMPLICIT NONE ! Enforce explicit typing of all variables in this routine

          ! FUNCTION ARGUMENT DEFINITIONS:
  character(len=*), intent(in) :: String   ! string to be matched
  integer, intent(in)          :: SetValue ! value to be used for the color
  character(len=*), intent(in), optional :: ColorType  ! for now, must be DXF
  logical :: WasSet

          ! FUNCTION PARAMETER DEFINITIONS:
          ! na

          ! INTERFACE BLOCK SPECIFICATIONS:
          ! na

          ! DERIVED TYPE DEFINITIONS:
          ! na

          ! FUNCTION LOCAL VARIABLE DECLARATIONS:
  integer :: found

  WasSet=.false.
  found=FindItem(String,colorkeys,NumColors)

  if (found /= 0) then
    if (present(colortype)) then
      if (colortype == 'DXF') then
        DXFcolorno(colorkeyptr(found))=SetValue
        WasSet=.true.
      else
      endif
    else
      DXFcolorno(colorkeyptr(found))=SetValue
      WasSet=.true.
    endif
  endif

  RETURN

END FUNCTION MatchAndSetColorTextString

SUBROUTINE SetUpSchemeColors(SchemeName,ColorType)

          ! SUBROUTINE INFORMATION:
          !       AUTHOR         Linda Lawrie
          !       DATE WRITTEN   August 2007
          !       MODIFIED       na
          !       RE-ENGINEERED  na

          ! PURPOSE OF THIS SUBROUTINE:
          ! This routine resets the colorno array(s) with the entered scheme name as
          ! required for reporting.

          ! METHODOLOGY EMPLOYED:
          ! This routine first sets the color arrays to default.  Then, attempts to find the
          ! scheme name in the Input File.  If found, processes that scheme and sets colors.
          ! Worst case: the colors remain as default.  Note -- this allocates and deallocates
          ! the alphas and numerics required to process the Report:SurfaceColorScheme object.

          ! REFERENCES:
          ! na

          ! USE STATEMENTS:
  USE DataGlobals, ONLY: MaxNameLength
  USE DataInterfaces, ONLY: ShowWarningError
  USE InputProcessor, ONLY: GetObjectItemNum, GetObjectItem, GetObjectDefMaxArgs

  IMPLICIT NONE ! Enforce explicit typing of all variables in this routine

          ! SUBROUTINE ARGUMENT DEFINITIONS:
  CHARACTER(len=*), INTENT(IN) :: SchemeName
  CHARACTER(len=*), INTENT(IN), OPTIONAL :: ColorType

          ! SUBROUTINE PARAMETER DEFINITIONS:
  CHARACTER(len=*), PARAMETER :: CurrentModuleObject='OutputControl:SurfaceColorScheme'

          ! INTERFACE BLOCK SPECIFICATIONS:
          ! na

          ! DERIVED TYPE DEFINITIONS:
          ! na

          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  integer :: numAlphas
  integer :: numNumbers
  integer :: numptr
  integer :: numargs
  integer :: status
  character(len=maxnamelength), dimension(:), allocatable :: cAlphas
  character(len=maxnamelength), dimension(:), allocatable :: cAlphafields
  character(len=maxnamelength), dimension(:), allocatable :: cNumericfields
  logical, dimension(:), allocatable :: lAlphablanks
  logical, dimension(:), allocatable :: lNumericblanks
  real(r64), dimension(:), allocatable :: rNumerics

  DXFcolorno=defaultcolorno
! first see if there is a scheme name
  numptr=GetObjectItemNum(CurrentModuleObject,SchemeName)


  if (numptr > 0) then

    CALL GetObjectDefMaxArgs(CurrentModuleObject,numargs,numAlphas,numNumbers)

    allocate(cAlphas(NumAlphas))
    allocate(cAlphafields(NumAlphas))
    allocate(lAlphablanks(NumAlphas))
    allocate(rNumerics(numNumbers))
    allocate(cNumericfields(numNumbers))
    allocate(lNumericBlanks(numNumbers))

    cAlphas(1:numAlphas)=' '
    rNumerics(1:numNumbers)=0.0d0

    CALL GetObjectItem(CurrentModuleObject,numptr,cAlphas,numAlphas,rNumerics,numNumbers,status,  &
                   AlphaBlank=lAlphablanks,NumBlank=lNumericblanks,  &
                   AlphaFieldnames=cAlphafields,NumericFieldNames=cNumericfields)
    do numargs=1,numNumbers
      numptr=rNumerics(numargs)  ! set to integer
      if (lNumericblanks(numargs)) then
        if (.not. lAlphablanks(numargs+1)) then
          CALL ShowWarningError('SetUpSchemeColors: '//TRIM(cAlphafields(1))//'='//TRIM(SchemeName)//  &
             ', '//TRIM(cAlphafields(numargs+1))//'='//TRIM(cAlphas(numargs+1))//  &
            ', '//TRIM(cNumericfields(numargs))//' was blank.  Default color retained.')
        endif
        cycle
      endif
      if (.not. MatchAndSetColorTextString(cAlphas(numargs+1),numptr,ColorType)) then
        CALL ShowWarningError('SetUpSchemeColors: '//TRIM(cAlphafields(1))//'='//TRIM(SchemeName)//  &
           ', '//TRIM(cAlphafields(numargs+1))//'='//TRIM(cAlphas(numargs+1))//  &
           ', is invalid.  No color set.')
      endif
    enddo

    deallocate(cAlphas)
    deallocate(cAlphafields)
    deallocate(lAlphablanks)
    deallocate(rNumerics)
    deallocate(cNumericfields)
    deallocate(lNumericBlanks)

  else
    CALL ShowWarningError('SetUpSchemeColors: Name='//TRIM(SchemeName)//  &
       ' not on input file. Default colors will be used.')
  endif

  RETURN

END SUBROUTINE SetUpSchemeColors


!     NOTICE
!
!     Copyright © 1996-2013 The Board of Trustees of the University of Illinois
!     and The Regents of the University of California through Ernest Orlando Lawrence
!     Berkeley National Laboratory.  All rights reserved.
!
!     Portions of the EnergyPlus software package have been developed and copyrighted
!     by other individuals, companies and institutions.  These portions have been
!     incorporated into the EnergyPlus software package under license.   For a complete
!     list of contributors, see "Notice" located in EnergyPlus.f90.
!
!     NOTICE: The U.S. Government is granted for itself and others acting on its
!     behalf a paid-up, nonexclusive, irrevocable, worldwide license in this data to
!     reproduce, prepare derivative works, and perform publicly and display publicly.
!     Beginning five (5) years after permission to assert copyright is granted,
!     subject to two possible five year renewals, the U.S. Government is granted for
!     itself and others acting on its behalf a paid-up, non-exclusive, irrevocable
!     worldwide license in this data to reproduce, prepare derivative works,
!     distribute copies to the public, perform publicly and display publicly, and to
!     permit others to do so.
!
!     TRADEMARKS: EnergyPlus is a trademark of the US Department of Energy.
!

END MODULE DataSurfaceColors

AirflowNetworkBalanceManager.f90 AirflowNetworkSolver.f90 BaseboardRadiator.f90 BaseboardRadiatorElectric.f90 BaseboardRadiatorSteam.f90 BaseboardRadiatorWater.f90 BranchInputManager.f90 BranchNodeConnections.f90 ConductionTransferFunctionCalc.f90 CoolTower.f90 CostEstimateManager.f90 CurveManager.f90 CVFOnlyRoutines.f90 DataAirflowNetwork.f90 DataAirLoop.f90 DataAirSystems.f90 DataBranchAirLoopPlant.f90 DataBranchNodeConnections.f90 DataBSDFWindow.f90 DataComplexFenestration.f90 DataContaminantBalance.f90 DataConvergParams.f90 DataConversions.f90 DataCostEstimate.f90 DataDaylighting.f90 DataDaylightingDevices.f90 Datadefineequip.f90 DataDElight.f90 DataEnvironment.f90 DataEquivalentLayerWindow.f90 DataErrorTracking.f90 DataGenerators.f90 DataGlobalConstants.f90 DataGlobals.f90 DataHeatBalance.f90 DataHeatBalFanSys.f90 DataHeatBalSurface.f90 DataHVACControllers.f90 DataHVACGlobals.f90 DataInterfaces.f90 DataIPShortCuts.f90 DataLoopNode.f90 DataMoistureBalance.f90 DataMoistureBalanceEMPD.f90 DataOutputs.f90 DataPhotovoltaics.f90 DataPlant.f90 DataPlantPipingSystems.f90 DataPrecisionGlobals.f90 DataReportingFlags.f90 DataRoomAir.f90 DataRootFinder.f90 DataRuntimeLanguage.f90 DataShadowingCombinations.f90 DataSizing.f90 DataStringGlobals.f90 DataSurfaceColors.f90 DataSurfaceLists.f90 DataSurfaces.f90 DataSystemVariables.f90 DataTimings.f90 DataUCSDSharedData.f90 DataVectorTypes.f90 DataViewFactorInformation.f90 DataWater.f90 DataZoneControls.f90 DataZoneEnergyDemands.f90 DataZoneEquipment.f90 DaylightingDevices.f90 DaylightingManager.f90 DElightManagerF.f90 DElightManagerF_NO.f90 DemandManager.f90 DesiccantDehumidifiers.f90 DirectAir.f90 DisplayRoutines.f90 DXCoil.f90 EarthTube.f90 EconomicLifeCycleCost.f90 EconomicTariff.f90 EcoRoof.f90 ElectricPowerGenerators.f90 ElectricPowerManager.f90 EMSManager.f90 EnergyPlus.f90 ExteriorEnergyUseManager.f90 ExternalInterface_NO.f90 FanCoilUnits.f90 FaultsManager.f90 FluidProperties.f90 General.f90 GeneralRoutines.f90 GlobalNames.f90 HeatBalanceAirManager.f90 HeatBalanceConvectionCoeffs.f90 HeatBalanceHAMTManager.f90 HeatBalanceInternalHeatGains.f90 HeatBalanceIntRadExchange.f90 HeatBalanceManager.f90 HeatBalanceMovableInsulation.f90 HeatBalanceSurfaceManager.f90 HeatBalFiniteDifferenceManager.f90 HeatRecovery.f90 Humidifiers.f90 HVACControllers.f90 HVACCooledBeam.f90 HVACDualDuctSystem.f90 HVACDuct.f90 HVACDXSystem.f90 HVACEvapComponent.f90 HVACFanComponent.f90 HVACFurnace.f90 HVACHeatingCoils.f90 HVACHXAssistedCoolingCoil.f90 HVACInterfaceManager.f90 HVACManager.f90 HVACMixerComponent.f90 HVACMultiSpeedHeatPump.f90 HVACSingleDuctInduc.f90 HVACSingleDuctSystem.f90 HVACSplitterComponent.f90 HVACStandAloneERV.f90 HVACSteamCoilComponent.f90 HVACTranspiredCollector.f90 HVACUnitaryBypassVAV.f90 HVACUnitarySystem.f90 HVACVariableRefrigerantFlow.f90 HVACWaterCoilComponent.f90 HVACWatertoAir.f90 HVACWatertoAirMultiSpeedHP.f90 InputProcessor.f90 MatrixDataManager.f90 MixedAir.f90 MoistureBalanceEMPDManager.f90 NodeInputManager.f90 NonZoneEquipmentManager.f90 OutAirNodeManager.f90 OutdoorAirUnit.f90 OutputProcessor.f90 OutputReportPredefined.f90 OutputReports.f90 OutputReportTabular.f90 PackagedTerminalHeatPump.f90 PackagedThermalStorageCoil.f90 Photovoltaics.f90 PhotovoltaicThermalCollectors.f90 PlantAbsorptionChillers.f90 PlantBoilers.f90 PlantBoilersSteam.f90 PlantCentralGSHP.f90 PlantChillers.f90 PlantCondLoopOperation.f90 PlantCondLoopTowers.f90 PlantEIRChillers.f90 PlantEvapFluidCoolers.f90 PlantExhaustAbsorptionChiller.f90 PlantFluidCoolers.f90 PlantGasAbsorptionChiller.f90 PlantGroundHeatExchangers.f90 PlantHeatExchanger.f90 PlantIceThermalStorage.f90 PlantLoadProfile.f90 PlantLoopEquipment.f90 PlantLoopSolver.f90 PlantManager.f90 PlantOutsideEnergySources.f90 PlantPipeHeatTransfer.f90 PlantPipes.f90 PlantPipingSystemManager.f90 PlantPondGroundHeatExchanger.f90 PlantPressureSystem.f90 PlantPumps.f90 PlantSolarCollectors.f90 PlantSurfaceGroundHeatExchanger.f90 PlantUtilities.f90 PlantValves.f90 PlantWaterSources.f90 PlantWaterThermalTank.f90 PlantWatertoWaterGSHP.f90 PlantWaterUse.f90 PollutionAnalysisModule.f90 PoweredInductionUnits.f90 PsychRoutines.f90 Purchasedairmanager.f90 RadiantSystemHighTemp.f90 RadiantSystemLowTemp.f90 RefrigeratedCase.f90 ReportSizingManager.f90 ReturnAirPath.f90 RoomAirManager.f90 RoomAirModelCrossVent.f90 RoomAirModelDisplacementVent.f90 RoomAirModelMundt.f90 RoomAirModelUFAD.f90 RoomAirModelUserTempPattern.f90 RootFinder.f90 RuntimeLanguageProcessor.f90 ScheduleManager.f90 SetPointManager.f90 SimAirServingZones.f90 SimulationManager.f90 SizingManager.f90 SolarReflectionManager.f90 SolarShading.f90 SortAndStringUtilities.f90 sqlite3.c SQLiteCRoutines.c SQLiteFortranRoutines.f90 SQLiteFortranRoutines_NO.f90 StandardRatings.f90 SurfaceGeometry.f90 SystemAvailabilityManager.f90 SystemReports.f90 TarcogComplexFenestration.f90 ThermalChimney.f90 ThermalComfort.f90 UnitHeater.f90 UnitVentilator.f90 UserDefinedComponents.f90 UtilityRoutines.f90 VectorUtilities.f90 VentilatedSlab.f90 WaterManager.f90 WeatherManager.f90 WindowAC.f90 WindowComplexManager.f90 WindowEquivalentLayer.f90 WindowManager.f90 WindTurbine.f90 Zoneairloopequipmentmanager.f90 ZoneContaminantPredictorCorrector.f90 ZoneDehumidifier.f90 Zoneequipmentmanager.f90 ZonePlenumComponent.f90 ZoneTempPredictorCorrector.f90