Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ZoneNum |
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 ManageMundtModel(ZoneNum)
! SUBROUTINE INFORMATION:
! AUTHOR Chanvit Chantrasrisalai
! DATE WRITTEN July 2003
! MODIFIED February 2004, fix allocate-deallocate problem (CC)
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! manage the Mundt model
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ZoneNum ! index number for the specified zone
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
LOGICAL, SAVE :: FirstTimeFlag = .TRUE. ! Used for allocating arrays
LOGICAL :: ErrorsFound
! FLOW:
! initialize Mundt model data
IF (FirstTimeFlag) THEN
CALL InitMundtModel
FirstTimeFlag = .FALSE.
END IF
! identify the current zone index for zones using Mundt model
MundtZoneNum = ZoneData(ZoneNum)%MundtZoneIndex
! transfer data from surface domain to air domain for the specified zone
CALL GetSurfHBDataForMundtModel(ZoneNum)
! use the Mundt model only for cooling case
IF ((SupplyAirVolumeRate.GT.0.0001d0).AND.(QsysCoolTot.GT.0.0001d0)) THEN
! setup Mundt model
ErrorsFound=.false.
CALL SetupMundtModel(ZoneNum,ErrorsFound)
IF (ErrorsFound) CALL ShowFatalError('ManageMundtModel: Errors in setting up Mundt Model. '// &
'Preceding condition(s) cause termination.')
! perform Mundt model calculations
CALL CalcMundtModel(ZoneNum)
END IF
! transfer data from air domain back to surface domain for the specified zone
CALL SetSurfHBDataForMundtModel(ZoneNum)
RETURN
END SUBROUTINE ManageMundtModel