Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | CurrentTime | |||
real(kind=r64), | intent(in) | :: | EqOfTime | |||
real(kind=r64), | intent(in) | :: | SinSolarDeclin | |||
real(kind=r64), | intent(in) | :: | CosSolarDeclin |
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 SUN4(CurrentTime,EqOfTime,SinSolarDeclin,CosSolarDeclin)
! SUBROUTINE INFORMATION:
! AUTHOR Legacy Code
! DATE WRITTEN
! MODIFIED na
! RE-ENGINEERED Lawrie, Oct 2000
! PURPOSE OF THIS SUBROUTINE:
! This subroutine computes solar direction cosines for a given hour. These
! cosines are used in the shadowing calculations.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! BLAST/IBLAST code, original author George Walton
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: CurrentTime ! Time to use in shadowing calculations
REAL(r64), INTENT(IN) :: EqOfTime ! Equation of time for current day
REAL(r64), INTENT(IN) :: SinSolarDeclin ! Sine of the Solar declination (current day)
REAL(r64), INTENT(IN) :: CosSolarDeclin ! Cosine of the Solar declination (current day)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) H ! Hour angle (before noon = +) (in radians)
REAL(r64) HrAngle ! Basic hour angle
! Compute the hour angle
HrAngle = (15.d0*(12.d0-(CurrentTime+EqOfTime))+(TimeZoneMeridian-Longitude))
H=HrAngle*DegToRadians
! Compute the cosine of the solar zenith angle.
SUNCOS(3) = SinSolarDeclin*SinLatitude + CosSolarDeclin*CosLatitude*COS(H)
SUNCOS(2) = 0.0d0
SUNCOS(1) = 0.0d0
IF (SUNCOS(3) < SunIsUpValue) RETURN ! Return if sun not above horizon.
! Compute other direction cosines.
SUNCOS(2) = SinSolarDeclin*CosLatitude - CosSolarDeclin*SinLatitude*COS(H)
SUNCOS(1) = CosSolarDeclin*SIN(H)
RETURN
END SUBROUTINE SUN4