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 | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | SlatAng | |||
logical, | intent(in) | :: | VarSlats | |||
real(kind=r64), | intent(in) | :: | PropArray(MaxSlatAngs) |
REAL(r64) FUNCTION InterpSlatAng(SlatAng,VarSlats,PropArray)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Winkelmann
! DATE WRITTEN Dec 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Does slat-angle interpolation of window blind solar-thermal properties that
! do not depend on profile angle
! METHODOLOGY EMPLOYED:
! Linear interpolation.
! REFERENCES:na
! USE STATEMENTS:
USE DataGlobals, ONLY: Pi,PiOvr2
USE DataSurfaces, ONLY : MaxSlatAngs
IMPLICIT NONE
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: SlatAng ! Slat angle (rad)
LOGICAL,INTENT(IN) :: VarSlats ! True if slat angle is variable
REAL(r64),INTENT(IN) :: PropArray(MaxSlatAngs) ! Array of blind properties as function of slat angle
! FUNCTION PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: DeltaAng = Pi/(REAL(MaxSlatAngs,r64)-1.d0)
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) InterpFac ! Interpolation factor
INTEGER IBeta ! Slat angle index
REAL(r64) SlatAng1
IF(SlatAng > Pi .OR. SlatAng < 0.0d0) THEN
! InterpSlatAng = 0.0
! RETURN
!END IF
SlatAng1 = MIN(MAX(SlatAng,0.0d0),PI)
ELSE
SlatAng1 = SlatAng
END IF
IF(VarSlats) THEN ! Variable-angle slats
IBeta = 1 + INT(SlatAng1/DeltaAng)
InterpFac = (SlatAng1 - DeltaAng*(IBeta-1))/DeltaAng
InterpSlatAng = PropArray(IBeta) + &
InterpFac*(PropArray(MIN(MaxSlatAngs,IBeta+1))-PropArray(IBeta))
ELSE ! Fixed-angle slats or shade
InterpSlatAng = PropArray(1)
END IF
RETURN
END FUNCTION InterpSlatAng