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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | ErrorsFound |
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 GetGroundTemps(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN October 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This file reads the Ground Temps from the input file and puts them
! in a new variable.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataIPShortCuts
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: GndNumAlpha ! Number of construction alpha names being passed
INTEGER :: GndNumProp ! dummy variable for properties being passed
INTEGER :: IOStat ! IO Status when calling get input subroutine
Integer :: I ! Loop counter variable
CHARACTER(len=MaxNameLength),DIMENSION(1) :: GndAlphas ! Construction Alpha names defined
REAL(r64), DIMENSION(12) :: GndProps !Temporary array to transfer ground temperatures
LOGICAL :: GenErrorMessage=.false.
! FLOW:
cCurrentModuleObject='Site:GroundTemperature:BuildingSurface'
I=GetNumObjectsFound(cCurrentModuleObject)
IF (I == 1) THEN
!Get the object names for each construction from the input processor
CALL GetObjectItem(cCurrentModuleObject,1,GndAlphas,GndNumAlpha, &
GndProps,GndNumProp,IOSTAT)
IF (GndNumProp < 12) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Less than 12 values entered.')
ErrorsFound=.true.
ENDIF
!Assign the ground temps to the variable
Do I=1,12
GroundTemps(I) = GndProps(I)
IF (GroundTemps(I) < 15.d0 .or. GroundTemps(I) > 25.d0) GenErrorMessage=.true.
End Do
GroundTempObjInput=.true.
ELSEIF (I > 1) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Too many objects entered. Only one allowed.')
ErrorsFound=.true.
ELSE
GroundTemps=18.d0
ENDIF
IF (GenErrorMessage) THEN
CALL ShowWarningError(TRIM(cCurrentModuleObject)//': Some values fall outside the range of 15-25C.')
CALL ShowContinueError('These values may be inappropriate. Please consult the Input Output Reference for more details.')
ENDIF
! Write Final Ground Temp Information to the initialization output file
Write(OutputFileInits,'(A)') '! <Site:GroundTemperature:BuildingSurface>, Months From Jan to Dec {C}'
Write(OutputFileInits,720) 'Site:GroundTemperature:BuildingSurface',(GroundTemps(I),I=1,12)
720 Format(' ',A,12(', ',F6.2))
!Added for ground temperatures for F and C factor defined surfaces
cCurrentModuleObject='Site:GroundTemperature:FCfactorMethod'
I=GetNumObjectsFound(cCurrentModuleObject)
IF (I == 1) THEN
CALL GetObjectItem(cCurrentModuleObject,1,GndAlphas,GndNumAlpha,GndProps,GndNumProp,IOSTAT)
IF (GndNumProp < 12) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Less than 12 values entered.')
ErrorsFound=.true.
ENDIF
FCGroundTemps=.true.
! overwrite values read from weather file for the 0.5m set ground temperatures
Do I=1,12
GroundTempsFC(I) = GndProps(I)
End Do
ELSEIF (I > 1) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Too many objects entered. Only one allowed.')
ErrorsFound=.true.
ELSEIF (wthFCGroundTemps) THEN
FCGroundTemps=.true.
ENDIF
IF (FCGroundTemps) THEN ! Write Ground Temp Information to the initialization output file
Write(OutputFileInits,'(A)') '! <Site:GroundTemperature:FCfactorMethod>, Months From Jan to Dec {C}'
Write(OutputFileInits,720) 'Site:GroundTemperature:FCfactorMethod',(GroundTempsFC(I),I=1,12)
ENDIF
PubGroundTempSurfFlag=.FALSE.
cCurrentModuleObject='Site:GroundTemperature:Shallow'
I=GetNumObjectsFound(cCurrentModuleObject)
IF (I == 1) THEN
!Get the object names for each construction from the input processor
CALL GetObjectItem(cCurrentModuleObject,1,GndAlphas,GndNumAlpha, &
GndProps,GndNumProp,IOSTAT)
IF (GndNumProp < 12) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Less than 12 values entered.')
ErrorsFound=.true.
ENDIF
!Assign the ground temps to the variable
Do I=1,12
SurfaceGroundTemps(I) = GndProps(I)
End Do
GroundTemp_SurfaceObjInput=.true.
ELSEIF (I > 1) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Too many objects entered. Only one allowed.')
ErrorsFound=.true.
ELSE
SurfaceGroundTemps=13.d0
ENDIF
! Write Final Ground Temp Information to the initialization output file
Write(OutputFileInits,'(A)') '! <Site:GroundTemperature:Shallow>, Months From Jan to Dec {C}'
Write(OutputFileInits,720) 'Site:GroundTemperature:Shallow',(SurfaceGroundTemps(I),I=1,12)
cCurrentModuleObject='Site:GroundTemperature:Deep'
I=GetNumObjectsFound(cCurrentModuleObject)
IF (I == 1) THEN
!Get the object names for each construction from the input processor
CALL GetObjectItem(cCurrentModuleObject,1,GndAlphas,GndNumAlpha, &
GndProps,GndNumProp,IOSTAT)
IF (GndNumProp < 12) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Less than 12 values entered.')
ErrorsFound=.true.
ENDIF
!Assign the ground temps to the variable
Do I=1,12
DeepGroundTemps(I) = GndProps(I)
End Do
GroundTemp_DeepObjInput=.true.
ELSEIF (I > 1) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Too many objects entered. Only one allowed.')
ErrorsFound=.true.
ELSE
DeepGroundTemps=16.d0
ENDIF
! Write Final Ground Temp Information to the initialization output file
Write(OutputFileInits,'(A)') '! <Site:GroundTemperature:Deep>, Months From Jan to Dec {C}'
Write(OutputFileInits,720) 'Site:GroundTemperature:Deep',(DeepGroundTemps(I),I=1,12)
!Assigning the ground temperature array to a public array for use in other subroutines
!Main use is for PlantPipeHeatTransfer, where the buried pipe model needs to average
! a full year's worth of data at the beginning of the simulation
IF(GroundTemp_SurfaceObjInput) THEN
PubGroundTempSurfFlag=.TRUE.
DO I = 1, 12
PubGroundTempSurface(I) = SurfaceGroundTemps(I)
END DO
END IF
RETURN
END SUBROUTINE GetGroundTemps