| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=r64) | :: | X | ||||
| real(kind=r64) | :: | Y | 
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.
FUNCTION DayltgGlarePositionFactor(X, Y)
          ! SUBROUTINE INFORMATION:
          !       AUTHOR         Fred Winkelmann
          !       DATE WRITTEN   July 1997
          !       MODIFIED       na
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          ! by table interpolation, evaluates the
          ! Hopkinson position factor used in glare calculation
          ! (Hopkinson, Petherbridge, AND Longmore -- Daylighting,
          ! London, 1966, PP 307, 323).  X (Y) is the lateral
          ! (vertical) distance of luminous window element from
          ! horizontal line of vision, divided by horizontal distance
          ! from eye of observer. The array PF contains values of
          ! the position factor for X = 0, 0.5, 1.0, 1.5, 2.0, 2.5,
          ! and 3.0 and Y = 0, 0.5, 1.0, 1.5, 2.0. Called by CalcDayltgCoefficients.
          ! METHODOLOGY EMPLOYED:
          ! REFERENCES:
          ! Based on DOE-2.1E subroutine DPFAC.
          ! USE STATEMENTS:
          ! na
  IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
          ! FUNCTION ARGUMENT DEFINITIONS:
  REAL(r64)   :: X,Y                     ! Lateral and vertical distance of luminous window element from
                                         !  horizontal line of vision, divided by horizontal distance from
                                         !  eye of observer
          ! FUNCTION PARAMETER DEFINITIONS:
          ! na
          ! INTERFACE BLOCK SPECIFICATIONS
          ! na
          ! DERIVED TYPE DEFINITIONS
          ! na
          ! FUNCTION LOCAL VARIABLE DECLARATIONS:
  INTEGER     :: IX,IY                   ! Lateral and vertical displacement indices
  REAL(r64)   :: X1,Y1                   ! Lateral and vertical displacement ratios
  REAL(r64)   :: FA,FB                   ! Intermediate variables
  REAL(r64)   :: DayltgGlarePositionFactor  ! Position factor
  REAL(r64), SAVE, DIMENSION(7,5) :: PF  ! Position factor array
  DATA PF  &
   / 1.00d0, .492d0, .226d0, .128d0, .081d0, .061d0, .057d0,  &
     .123d0, .119d0, .065d0, .043d0, .029d0, .026d0, .023d0,  &
     .019d0, .026d0, .019d0, .016d0, .014d0, .011d0, .011d0,  &
     .008d0, .008d0, .008d0, .008d0, .008d0, .006d0, .006d0,  &
     0.00d0, 0.00d0, .003d0, .003d0, .003d0, .003d0, .003d0 /
          ! FLOW:
  DayltgGlarePositionFactor = 0.0d0
  IF (X < 0.0d0.OR. X >= 3.0d0) RETURN
  IF (Y < 0.0d0 .OR. Y >= 2.0d0) RETURN
  IX = 1 + INT(2.d0 * X)
  IY = 1 + INT(2.d0 * Y)
  X1 = 0.5d0 * REAL(IX - 1,r64)
  Y1 = 0.5d0 * REAL(IY - 1,r64)
  FA = PF(IX,IY) + 2.0d0 * (X - X1) * (PF(IX + 1,IY) - PF(IX,IY))
  FB = PF(IX,IY + 1) + 2.0d0 * (X-X1) * (PF(IX + 1,IY + 1) - PF(IX,IY + 1))
  DayltgGlarePositionFactor = FA + 2.0d0 * (Y - Y1) * (FB - FA)
  RETURN
END FUNCTION DayltgGlarePositionFactor