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 CheckForMisMatchedEnvironmentSpecifications
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN August 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! In response to CR 7518, this routine will check to see if a proper combination of SimulationControl, RunPeriod,
! SizingPeriod:*, etc are entered to proceed with a simulation.
! METHODOLOGY EMPLOYED:
! For now (8/2008), the routine will query several objects in the input. And try to produce warnings or
! fatals as a result.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumZoneSizing
INTEGER :: NumSystemSizing
INTEGER :: NumPlantSizing
INTEGER :: NumDesignDays
INTEGER :: NumRunPeriodDesign
INTEGER :: NumSizingDays
LOGICAL :: WeatherFileAttached
LOGICAL :: ErrorsFound
ErrorsFound=.false.
NumZoneSizing=GetNumObjectsFound('Sizing:Zone')
NumSystemSizing=GetNumObjectsFound('Sizing:System')
NumPlantSizing=GetNumObjectsFound('Sizing:Plant')
NumDesignDays=GetNumObjectsFound('SizingPeriod:DesignDay')
NumRunPeriodDesign=GetNumObjectsFound('SizingPeriod:WeatherFileDays')+GetNumObjectsFound('SizingPeriod:WeatherFileConditionType')
NumSizingDays=NumDesignDays+NumRunPeriodDesign
INQUIRE(FILE='in.epw',EXIST=WeatherFileAttached)
IF (RunControlInInput) THEN
IF (DoZoneSizing) THEN
IF (NumZoneSizing > 0 .and. NumSizingDays == 0) THEN
ErrorsFound=.true.
CALL ShowSevereError('CheckEnvironmentSpecifications: Sizing for Zones has been requested but there are no '// &
'design environments specified.')
CALL ShowContinueError('...Add appropriate SizingPeriod:* objects for your simulation.')
ENDIF
IF (NumZoneSizing > 0 .and. NumRunPeriodDesign > 0 .and. .not. WeatherFileAttached) THEN
ErrorsFound=.true.
CALL ShowSevereError('CheckEnvironmentSpecifications: Sizing for Zones has been requested; Design period from '// &
'the weather file requested; but no weather file specified.')
ENDIF
ENDIF
IF (DoSystemSizing) THEN
IF (NumSystemSizing > 0 .and. NumSizingDays == 0) THEN
ErrorsFound=.true.
CALL ShowSevereError('CheckEnvironmentSpecifications: Sizing for Systems has been requested but there are no '// &
'design environments specified.')
CALL ShowContinueError('...Add appropriate SizingPeriod:* objects for your simulation.')
ENDIF
IF (NumSystemSizing > 0 .and. NumRunPeriodDesign > 0 .and. .not. WeatherFileAttached) THEN
ErrorsFound=.true.
CALL ShowSevereError('CheckEnvironmentSpecifications: Sizing for Systems has been requested; Design period from '// &
'the weather file requested; but no weather file specified.')
ENDIF
ENDIF
IF (DoPlantSizing) THEN
IF (NumPlantSizing > 0 .and. NumSizingDays == 0) THEN
ErrorsFound=.true.
CALL ShowSevereError('CheckEnvironmentSpecifications: Sizing for Equipment/Plants has been requested but there are no '// &
'design environments specified.')
CALL ShowContinueError('...Add appropriate SizingPeriod:* objects for your simulation.')
ENDIF
IF (NumPlantSizing > 0 .and. NumRunPeriodDesign > 0 .and. .not. WeatherFileAttached) THEN
ErrorsFound=.true.
CALL ShowSevereError('CheckEnvironmentSpecifications: Sizing for Equipment/Plants has been requested; '// &
'Design period from the weather file requested; but no weather file specified.')
ENDIF
ENDIF
IF (DoDesDaySim .and. NumSizingDays == 0) THEN
CALL ShowWarningError('CheckEnvironmentSpecifications: SimulationControl specified doing design day simulations, but '// &
'no design environments specified.')
CALL ShowContinueError('...No design environment results produced. For these results, '// &
'add appropriate SizingPeriod:* objects for your simulation.')
ENDIF
IF (DoDesDaySim .and. NumRunPeriodDesign > 0 .and. .not. WeatherFileAttached) THEN
ErrorsFound=.true.
CALL ShowSevereError('CheckEnvironmentSpecifications: SimulationControl specified doing design day simulations; weather '// &
'file design environments specified; but no weather file specified.')
ENDIF
IF (DoWeathSim .and. .not. RunPeriodsInInput) THEN
CALL ShowWarningError('CheckEnvironmentSpecifications: SimulationControl specified doing weather simulations, but '// &
'no run periods for weather file specified. No annual results produced.')
ENDIF
IF (DoWeathSim .and. RunPeriodsInInput .and. .not. WeatherFileAttached) THEN
CALL ShowWarningError('CheckEnvironmentSpecifications: SimulationControl specified doing weather simulations; '// &
'run periods for weather file specified; but no weather file specified.')
ENDIF
ENDIF
IF (.not. DoDesDaySim .and. .not. DoWeathSim) THEN
CALL ShowWarningError('"Do the design day simulations" and "Do the weather file simulation"'// &
' are both set to "No". No simulations will be performed, and most input will not be read.')
ENDIF
IF (.not. DoZoneSizing .and. .not. DoSystemSizing .and. .not. DoPlantSizing .and. &
.not. DoDesDaySim .and. .not. DoWeathSim) THEN
CALL ShowSevereError('All elements of SimulationControl are set to "No". No simulations can be done. Program terminates.')
ErrorsFound=.true.
ENDIF
IF (ErrorsFound) THEN
CALL ShowFatalError('Program terminates due to preceding conditions.')
ENDIF
RETURN
END SUBROUTINE CheckForMisMatchedEnvironmentSpecifications