Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | TimeValue | |||
real(kind=r64), | intent(in) | :: | EqOfTime | |||
real(kind=r64), | intent(in) | :: | SinSolDeclin | |||
real(kind=r64), | intent(in) | :: | CosSolDeclin | |||
real(kind=r64), | intent(out) | :: | SUNCOS(3) |
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 CalculateSunDirectionCosines(TimeValue,EqOfTime,SinSolDeclin,CosSolDeclin,SUNCOS)
! SUBROUTINE INFORMATION:
! AUTHOR George Walton
! DATE WRITTEN May 1975
! MODIFIED 1999 for EnergyPlus
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine computes the solar direction cosines for hourly
! radiation calculations.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! "NECAP Engineering Manual", 1974, p.3-117
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: TimeValue ! Current Time of Day
REAL(r64), INTENT(IN) :: EqOfTime ! Equation of Time
REAL(r64), INTENT(IN) :: SinSolDeclin ! Sine of Solar Declination
REAL(r64), INTENT(IN) :: CosSolDeclin ! Cosine of Solar Declination
REAL(r64), INTENT(OUT) :: SUNCOS(3)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) COSH ! Cosine of hour angle
REAL(r64) H ! Hour angle (before noon = +)
! COMPUTE THE HOUR ANGLE
H=(15.d0*(12.d0-(TimeValue+EqOfTime))+(TimeZoneMeridian-Longitude))*DegToRadians
COSH=COS(H)
! COMPUTE THE COSINE OF THE
! SOLAR ZENITH ANGLE.
! This is also the Sine of the Solar Altitude Angle
SUNCOS(3)=SinSolDeclin*SinLatitude+CosSolDeclin*CosLatitude*COSH
IF(SUNCOS(3) >= SunIsUpValue) THEN ! If Sun above horizon, compute other direction cosines
SUNCOS(2)=SinSolDeclin*CosLatitude-CosSolDeclin*SinLatitude*COSH
SUNCOS(1)=CosSolDeclin*SIN(H)
ELSE ! Sun is down, set to 0.0
SUNCOS(1)=0.0d0
SUNCOS(2)=0.0d0
ENDIF
RETURN
END SUBROUTINE CalculateSunDirectionCosines