SolarEnergyVol.27.pp.67-68,198I Printedin GreatBritain.
0038-092XI81t070067-02502.0010 PergamonPressLtd.
TECHNICAL NOTE An improved FORTRAN program for the rapid calculation of the solar position B. J. WILKINSON Department of Environmental Studies, Rusden State College, 662, Blackburn Road, Clayton, Victoria, Australia 3168 (Received 11 December 1980; accepted 26 January 1981)
I. INTRODUCTION A FORTRAN program for calculating the position of the Sun to a high degree of accuracy has been given by Walraven[1]. This program has been developed to allow rapid computation for solar energy applications in which solar tracking is necessary. The subroutine (called SUNAE) given by Walraven generates the values of the azimuthal angle (A) and the angular elevation (E) of the Sun as a function of time and position. Two sets of correction terms must be incorporated into SUNAE in order to give the values of A and E to the desired accuracy (_+0.01°), namely: (1) The expression for the time of day, and the formula for the local siderial time must be amended. (2) Allowance must be made for the effect of refraction in the atmosphere. The effect of applying the first set of correction terms to SUNAE is shown to lead to changes in the values of A and E of up to a few degrees. Taking atmospheric refraction into account is shown to lead to corrections to A and E which are as high as some tenths of a degree in the most serious cases. For the specific case of Melbourne, the corrected algorithm is shown to give complete agreement with the solar tables of Spencer[2] when the values of A and E are rounded to the nearest degree.
values of A and E to within _+0.01°, this effect must be allowed for, as discussed by Archer[4]. To do this the equation for the angular elevation (E), which occurs in line 49 of SUNAE, must be replaced by the following equations: Q = SIN(PHI) * SIN(DECL)
(3)
RC = (1./(0.955 + (20.267 * Q))) - 0.047121
(4)
QRC = Q + (0.0083 * RC)
(5)
E = ASIN (QRC)
(6)
where Q is the value of SIN(E) without any allowance for atmospheric refraction; RC is a correction term to Q which leads to the corrected form of Q, given as QRC in eqn (5); and E is the resulting corrected value of E. (This corrected value of E is then used in the expression for A, in line 50 of SUNAE, which, therefore, needs no alteration.) Using the same example as in the previous section, the values of A and E, with and without a correction for the effect of refraction in the atmosphere, are shown in Table 2. Thus, the
2. TIME OF DAY AND SIDERIAL TIME CORRECTIONS
Table 1. The effect on A and E of applying time of day and local siderial time corrections. Year: 1977. Day: 120 (30 April). Latitude: 38.538°N. Longitude: 121.758°W. of Greenwich
As pointed out by Walraven[3], the expression for the time of day (T), which occurs in line 28 of the subroutine SUNAE, should actually read: T = HR + (MIN + SEC/60.)/60. + ZONE-DASVTM.
+ COS(PHI) * COS(DECL) * COS(H)
(1)
Also, the equation for local siderial time iS), which occurs in line 45 of SUNAE, should read:
HOUR
Ao
AT, S
Eo
ET,S
7 AM
101.94
102.35
8.76
8.38
(2)
8 AM
92.94
93.39
20.42
20.00
The effect of applying these corrections is quite considerable. For the example given in Walraven's original paper, Table 1 shows the originally published values of A and E together with the corresponding corrected values, using eqns (1) and (2). The subscripts on the symbols A and E indicate the corrections which are applied; thus, Ao and Eo are the original (incorrect) values of azimuth and elevation, and Ar, s and Er.s are the values of A and E obtained by using the corrected expressions for T and S as in eqns (1) and (2) above. As can be seen from Table 1, the most serious discrepancies show up in the azimuth around the middle of the day when this parameter is undergoing its most rapid change. "For the specific example chosen, the maximum discrepancy of about 20 occurs at around 1 p.m.
9 AM
83.36
83.88
32.17
31.72
I0 AM
72.01
72.69
43.67
43.21
II AM
56.75
57.74
54.30
53.88
12 NOON
33.78
35.31
62.73
62.47
S = ST + (T * 15. - LONG) * RAD.
1PM
3. ATMOSPHERIC REFRACTION CORRECTION
The subroutine SUNAE does not take into account the effect of refraction in the Earth's atmosphere. In order to generate 67
0.57
2.53
66.30
66,37
2 PM
-32.90
-31.34
62.96
63.39
3 PM
-56,23
-55,22
54.64
55.29
4 PM
-71.68
-70.97
44,07
44.82
5 PM
-83.14
-82.55
32.60
33,41
6 PM
-92.76
-92.22
20.87
21.71
7 PM
-101,78
-101.22
9.21
10.08
68
Technical Note
Table 2. The effect on A and E of allowing for atmospheric refraction. Year: 1977. Day: 120 (30 April). Latitude: 38.538°N. Longitude: 121.758°W. of Greenwich
HOUR
AT,S
AT,S, R
ET,S
ET,S, R
7 AM
I02.35
I02.28
8.38
8.48
8 AM
93.39
93.13
20.00
20.04
9 AM
83.88
84.01
31.72
31.75
lO AM
72.69
72.73
43.21
43.22
I I AM
57.74
57.76
53.88
53.89
12 NOON
35.31
35.31
62.47
62.47
l PM
2.53
2.53
66.37
66.38
2 PM
-31.34
-31.35
63.39
63.40
3 PM
-55.22
-55.23
55.29
55.29
4 PM
-70.97
-71.00
44.82
44.83
5 PM
-82.55
-82.65
33.41
33.43
-91.81
21.71
21.75
I0.08
lO.16
6 PM
-92.22
7 PM
-I01.22
-I01.14
differences can amount to about ½° (e.g. see the values of A at 6 p.m.). 4. CONCLUSION The solar tables of Spencer (op cit.) have been prepared for use in the design of buildings for the specific location of Melbourne, and give the solar position to within -+1°. As a rough check on the work presented in this paper, Table 3 shows a comparison of the fully corrected version of SUNAE with the tables of Spencer for the 22 January 1981. As can be seen, in every case the accurate values of azimuth and elevation agree with the approximate values within the -+1° limitations of Spencer's results. A more useful check than this could be furnished by actually making accurate measurements of the solar position. It would also be useful to test whether the corrected form of SUNAE does indeed give the tracking accuracy required for a given experimental situation.
Acknowledgements--lt is a pleasure to thank Mr. J. W. Spencer of the CSIRO Division of Building Research, Highett, Victoria, Australia for many valuable discussions throughout the course of this work. I am also indebted to Dr. R. Walraven (Dept. of Land, Air and Water Resources, University of California), and Dr. P. Carden (Dept. of Engineering Physics, Research School of Physical Sciences, Australian National University), for helpful communications. REFERENCES
correct, accurate values of A and E are given in Table 2 as AT.S.R and Er.s.R, the final subscript indicating that the effect of atmospheric refraction has been taken into account. The most serious discrepancies in this case occur when the sun is close to the horizon. Table 2 shows that, at worst, these
1. R. Walraven, Calculating the position of the Sun. Solar Energy 20, 393 (1978). 2. J. W. Spencer, CSIRO Australian Division of Building Research, Tech. Paper (2nd Series), 7, pp. 1-91 (1974). 3. R. Walraven, Erratum. Solar Energy 22, 195 (1979). 4. C. B. Archer, Comments on "Calculating the position of the Sun". Solar Energy 25, 91 (1980).
Table 3. Comparison of the values of A and E generated by the corrected version of SUNAE with the approximate values of Spencer. Year: 1981. Day: 22 (22 January). Latitude: -37.833°S. Longitude: 215.017°W. of Greenwich HOUR
APPROXIMATE VALUE ACCURATEVALUE OF AZIMUTH OF AZIMUTH (Spencer,1974) (Walraven,1978 + Corrections)
APPROXIMATE VALUE OF ELEVATION (Spencer,1974)
ACCURATEVALUE OF ELEVATION (Walraven,1978 + Corrections)
6 AM
II0
110.21
6
6.00
7 AM
102
101.60
18
17.29
8 AM
93
92.82
29
29.00
9 AM
84
83.72
41
40.81
lO AM
72
71.71
53
52.36
I I AM
54
53.87
63
62.91
12 NOON
22
22.93
71
70.40
l PM
-21
-20.38
71
70.66
2 PM
-53
-52.36
64
63.48
3 PM
-71
-70.76
53
53.04
4 PM
-83
-82.98
42
41.51
5 PM
-93
-92.10
30
29.69
6 PM
-102
-I00.98
18
17.96
7 PM
-]I0
-109.56
7
6.62