1 |
< |
/* Copyright (c) 1986 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
150 |
|
st = hour + stadj(jd); |
151 |
|
altitude = salt(sd, st); |
152 |
|
azimuth = sazi(sd, st); |
153 |
+ |
} |
154 |
+ |
if (!cloudy && altitude > 87.*PI/180.) { |
155 |
+ |
fprintf(stderr, |
156 |
+ |
"%s: warning - sun too close to zenith, reducing altitude to 87 degrees\n", |
157 |
+ |
progname); |
158 |
+ |
printf( |
159 |
+ |
"# warning - sun too close to zenith, reducing altitude to 87 degrees\n"); |
160 |
+ |
altitude = 87.*PI/180.; |
161 |
|
} |
162 |
|
sundir[0] = -sin(azimuth)*cos(altitude); |
163 |
|
sundir[1] = -cos(azimuth)*cos(altitude); |