Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | CosTilt | |||
real(kind=r64), | intent(in) | :: | Azimuth | |||
real(kind=r64), | intent(in) | :: | WindDirection |
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 Windward(CosTilt, Azimuth, WindDirection) RESULT(AgainstWind)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN September 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function determines if a surface is "windward" or "leeward" (that is,
! into / against the wind (true) or in shelter from wind (false).
! METHODOLOGY EMPLOYED:
! Leeward is defined as greater than 100 degrees from normal incidence.
! Note that a sufficiently horizontal surface is always considered windward.
! REFERENCES:
! Walton, G. N. 1981. Passive solar extension of the Building Loads
! Analysis and System Thermodynamics (BLAST) program. Technical Report,
! United States Army Construction Engineering Research Laboratory,
! Champaign, IL.
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: CosTilt ! Cosine of the surface tilt angle
REAL(r64), INTENT(IN) :: Azimuth ! or Facing, Direction the surface outward normal faces (degrees)
REAL(r64), INTENT(IN) :: WindDirection ! Wind direction measured clockwise from geographhic North
LOGICAL :: AgainstWind ! True for windward, false for leeward.
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: Diff ! Difference between the wind direction and the surface azimuth
AgainstWind = .True.
IF (ABS(CosTilt) < 0.98d0) THEN ! Surface is not horizontal
Diff = ABS(WindDirection - Azimuth)
IF ((Diff-180.d0) > .001d0 ) Diff = Diff - 360.0d0
IF ((ABS(Diff)-100.d0) > .001d0) AgainstWind = .False. ! Surface is leeward
ENDIF
RETURN
END FUNCTION Windward