Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | sid |
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 UpdateHeatBalHAMT(sid)
! SUBROUTINE INFORMATION:
! AUTHOR Phillip Biddulph
! DATE WRITTEN June 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! The zone heat balance equation has converged, so now the HAMT values are to be fixed
! ready for the next itteration.
! Fill all the report variables
! 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) :: sid
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: cid
REAL(r64) :: watermass
REAL(r64) :: matmass
!unused1208 REAL(r64), SAVE :: InOld=0.0D0
!unused1208 REAL(r64), SAVE :: OutOld=0.0D0
!Update Temperatures and RHs. Calculate report variables
matmass=0.0D0
watermass=0.0D0
DO cid=firstcell(sid),lastcell(sid)
! fix HAMT values for this surface
cells(cid)%temp=cells(cid)%tempp1
cells(cid)%rh=cells(cid)%rhp1
cells(cid)%rhp=cells(cid)%rh*100.d0
IF(cells(cid)%density>0.0d0)THEN
cells(cid)%wreport=cells(cid)%water/cells(cid)%density
watermass=watermass+(cells(cid)%water*cells(cid)%volume)
matmass=matmass+(cells(cid)%density*cells(cid)%volume)
ENDIF
ENDDO
watertot(sid)=0.0d0
IF(matmass>0) watertot(sid)=watermass/matmass
surfrh(sid)=100.0d0*cells(Intcell(sid))%rh
surfextrh(sid)=100.0d0*cells(Extcell(sid))%rh
surftemp(sid)=cells(Intcell(sid))%temp
surfexttemp(sid)=cells(Extcell(sid))%temp
surfvp(sid)=RHTOVP(cells(Intcell(sid))%rh,cells(Intcell(sid))%temp)
END SUBROUTINE UpdateHeatBalHAMT